Re: checking if a floating point number is equal in value to an integer



On Jan 30, 5:41 am, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:

The aint() function has real type, giving the truncated value
as type real (of the appropriate kind for versions that support
kind). So I would suggest aint(a)==a as the test over
float(nint(a))==a.

And do not forget the standard intrinsic function anint, which gives
the closest whole number, like an integer, but of type real.
aint is analogous of int, but with real type
anint is analogous of nint, but with real type

.