GNOME Bugzilla – Bug 527540
Rounding errors
Last modified: 2009-02-28 06:20:32 UTC
This report has been entered here: https://bugs.edge.launchpad.net/ubuntu/+source/gcalctool/+bug/215663 "If type 4^2-16 calc returns -0. Should be 0." Thanks,
Adjusting the summary to reflect that this only happens in arithmetic precedence mode.
Sami, Can you have a look at this when fixing 516159, cheers.
This seems not to be arithmetic precedence related problem. I am able to reproduce this also in left-to-right precedence mode.
Interesting. I couldn't. I tried: 4 x2 - 1 6 = That gives an answer of 0. Can you give me a set of steps to get an answer of -0?
I don't have access to gcalctool right now. However, I remember I tried one of the following with svn head gcalctool: 4 ^ (that is, x^y button) 2 - 1 6 = OR perhaps it was 4 ^ (that is, x^y button) 2 = - 1 6 = I can check it again tomorrow.
Yup, both of those give -0. Adjusting summary to remove '[ARITH]'.
This seems to be a rounding problem as highlighted in bug 560802. - If you change to scientific mode 4^2-16=-1.740501312e-214
*** Bug 560802 has been marked as a duplicate of this bug. ***
Fixed integer power calculations in 5.26.0: http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2399