checking if a floating point number is equal in value to an integer
- From: analyst41@xxxxxxxxxxx
- Date: 29 Jan 2007 17:56:04 -0800
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).
.
- Follow-Ups:
- Re: checking if a floating point number is equal in value to an integer
- From: glen herrmannsfeldt
- Re: checking if a floating point number is equal in value to an integer
- From: Tim Prince
- Re: checking if a floating point number is equal in value to an integer
- From: ejko123
- Re: checking if a floating point number is equal in value to an integer
- Prev by Date: Re: What is going on with Lahey?
- Next by Date: Re: checking if a floating point number is equal in value to an integer
- Previous by thread: What is going on with Lahey?
- Next by thread: Re: checking if a floating point number is equal in value to an integer
- Index(es):