https://bugs.freedesktop.org/show_bug.cgi?id=86005
--- Comment #4 from Robinson Tryon (qubit) <[email protected]> --- (In reply to Jindrich Svorc from comment #3) > > I agree with 1/3 but 8+(8.45-8)/0.6-7.75 should give exact 1, not > 0.9999999999... > 1/3 is periodically ended number but the result of the equation above is > not. If you calculate it by hand you will get 1, not something close to 1. > That's what puzzles me. Sure, but you aren't representing 0.45 or 0.6 as floating-point numbers :-) > Interestingly, if you change the equation to get result = 2 it calculates it > correctly. Indeed! Look at this: (8.45-8)/0.6 -> 0.749 999 999 999 999 000 00 0.45/0.6 -> 0.750 000 000 000 000 000 00 (7.45-7)/0.6 -> 0.750 000 000 000 000 000 00 (3.45-3)/0.6 -> 0.749 999 999 999 999 000 00 (9.45-9)/0.6 -> 0.749 999 999 999 999 000 00 > I would not care too much since I usually don't need the 15th place but the > problem is that INT function gives me 0 instead of 1 so it suddenly creates > a big difference. Perhaps you could use 10 or 15 places of precision? That should hopefully round the number up or down as expected... -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
