A bit more research on the calculator problem (as if I understand any of it) --
Binary representation of fractions is not entirely accurate. Binary uses powers of 2. Each digit of a binary number represents the coefficient of 2^i for bit position i (numbering starts at 0 for the position immediately to the left of the radix point and increase to the left and decrease to the right).
In English (sorta): Each fraction must be represented by some combination of whose denominators are powers of 2 and whose numerators are either 0 or 1. Not all fractions can be represented in this manner with 100% accuracy. Even those that can may require more bits than the standard 32-bit and 64-bit IEEE 754 formats for floating point numbers. Thus, some accuracy is lost as the bits are truncated to fit into the formats.
The IEEE 754 32-bit single-precision floating point numbers use 1 bit for the sign, 8 bits for the excess-127 representation of the exponent (with 00000000 and 11111111 being reserved for special cases), and 23 bits for the base-2 fraction. There is an implied 1 to the left of the binary point.
The 64-bit double-precision floating point numbers use 1 bit for the sign, 11 bits for the excess-1023 representation of the exponent (with all 0's and all 1's being reserved for special cases) and 52 bits for the floating point representation of the base-2 fraction.
Thus, if one subtracts .1 and then subtracts .9 from 1.0, the answer is 0.
But, if one subtracts .9 and then subtracts .1 from 1.0, the answer is -2.775558e-17.
Maybe someone who really understands this will rise to the occasion...
Suffice it to say, I just BIOB!
Harv