https://bugs.documentfoundation.org/show_bug.cgi?id=152039
--- Comment #3 from Mike Kaganski <[email protected]> --- (In reply to Jonny Grant from comment #2) > Maybe you didn't understand this issue? I did. When you write: > I always recall "double" precision floating point has 15 decimal places. you yourself don't understand that these 15 decimal places are *not* "places to the right of the decimal point, no matter how many more digits I have to the left", but *all* the decimals in the number. Again: the error comes not even from 287.9500000000010, but from 8495.95. This number is stored in 64-bit double exactly as 8495.95000000000072759576141834259033203125 and you can count where the error starts: it's the "7" at 13th digit after the decimal dot, which is the 17th digit of the number. Now you perform a negation: 8495.95000000000072759576141834259033203125 -8208 = 287.95000000000072759576141834259033203125 That *is* the *exact* result, that is stored after the negation. It has the "7" in 13th digit after the decimal digit, and when rounded to 15 *significant* digits (i.e., showing total of 15 digits of the number, which is the maximum shown to user in Calc), the "7" is correctly rounded up to "10", giving you the "1" in 12th position after the decimal. -- You are receiving this mail because: You are the assignee for the bug.
