@kmw The page also states:
Although these values appear to be alike, the internal representations differ slightly, because the IEEE floating-point representation can only represent 15 digits.
This issue pertains to floating-point representation on the x64 processors.
I find these 2 statements misleading:
1- The 15 digit representation limit does not explain (the word "because" is used) in any way that SAS reads these numbers in this way:
3FE0000000000000 L=21 NB=0.50000000000000000000000
3FE0000000000000 L=22 NB=0.500000000000000000000000
3FDFFFFFFFFFFFFE L=23 NB=0.5000000000000000000000000
3FDFFFFFFFFFFFFE L=24 NB=0.50000000000000000000000000
3FDFFFFFFFFFFFFF L=25 NB=0.500000000000000000000000000
3FE0000000000000 L=26 NB=0.5000000000000000000000000000
3FE0000000000000 L=27 NB=0.50000000000000000000000000000
3FDFFFFFFFFFFFFF L=28 NB=0.500000000000000000000000000000
3FDFFFFFFFFFFFFF L=29 NB=0.5000000000000000000000000000000
3FE0000000000000 L=30 NB=0.50000000000000000000000000000000
3FE0000000000000 L=31 NB=0.500000000000000000000000000000000
3FE0000000000000 L=32 NB=0.5000000000000000000000000000000000
2- Likewise, the floating-point representation on the x64 processors does not exhibit issues explaining this behaviour of only SAS only under Windows.
3-Unrelated to this discussion but related to numerical precision, and much much wider and very puzzling:
The whole numerical precision issue exists because rational numbers were introduced to represent floating-point numbers.This seems like a ludicrous idea.
Rational numbers were introduced to represent the mantissa value when negative exponents were used as part of the algorithm detailed above. Had the mantissa portion of the number kept positive exponent representations only, with the position of the decimal dot shifted using the exponent portion of the number, this numerical precision issue would not even exist.
There must have been a reason to decide using negative exponents and try to represent the decimal portion of numbers using the sum of rational numbers.
Do you know what on earth could this justification could be?
... View more