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



I am using float(nint(a)) == a as the test. I'd appreciate any
comments and/or better suggestions.

Also - I am interested in a NINT function that will use a random
number to decide what to do when the argument is an exact half-integer
(my idea is to test if 2.0*argument is an exact integer).

.