>numbers between 1 and 2. A Floating Point system
only has about 8
>million, and doesn't have any odd numbers above about 16 million.
On Mon, 24 Feb 2003, Kevin Handy wrote:
Does odd/even have much meaning with floating point
numbers,
real or otherwise?
Yes, it DOES.
The point is that with floating point numbers, there are GAPS. BIG
gaps. Try storing a value of 100,000,001.0 in floating point.
You can't.
If you store 2147483649.0 in float, it will store 2147483648.0
[IEEE float, not any customized or imaginary system]
Being even means it can be divided by two without any
remainder,
OR having a remainder of 0.0
but with any king of floating point, remainder
doesn't have much
meaning. ie. is 3.4 or 3.5 odd or even? What are the reaminders?
odd, odd, 1.4,
1.5
Is PI odd or even?
odd
but 4.0 is considered to be EVEN.
The only way to decide is to convert them to integers,
and then
decide, but then you are working with a different set of numbers.
NOPE.
While it is, admittedly, an integer concept, any integer multiple of 2.0
(remainder of 0.0) is considered to be an even number.
AND THE RELEVANT part is that NO number over 16M that is not an integer
multiple of 2.0 can be stored in floating point! Past 8M, there are no
floating point numbers that are not exactly equal to integers.