Base 10 to Base 2 conversion error ?
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1703] Base 10 to Base 2 conversion error ?
- From: randy_taylor at ids.net (Randy Taylor)
- Date: Mon, 17 Jul 1995 04:04:31 -0400
- Organization: IDS World Network Internet Access Service, (800)IDS-1680
I hope one of the mathematicians can help me with this one: Are there any base 10 numbers with two significant digits to the right of the decimal point that such that conversion to base 2 and then re-conversion to base 10 does not yield the exact original value? I happen to use Intel x86 chips with floating point registers, but this isn't really a question about the famous Intel floating point problem. Why do I care? Some people at my company (a maker of retail store point-of-sale systems) say that no such numbers exist, and they propose using the floating point format variables (the C language type double or float) to hold U.S. currency amounts. I've claimed that the system will not properly keep track of each penny of we do this. Especially when we divide these amounts by other floating point amounts. Is this correct? Am I full of hot air? Thanks!