Bug#567382: gcalctool: calculates negative powers wrong (-2^2=-4 should be 4)
Emilio Pozuelo Monfort
pochu at debian.org
Thu Jan 28 22:36:04 UTC 2010
On 28/01/10 20:14, volcan wrote:
> Package: gcalctool
> Version: 5.28.2-1
> Severity: important
>
> Using 5.28.2 - the latest in my repository,
> the square button works right, meaning -2<square> = 4
> but the raise to does not, -2^2 = -4, or similarly -2^4 = -16 (where it should just be 16) There is a newer version available from soure, I don't know if the problem is solved, i can't build it, but anyway should be pretty easy to fix, and if it is fixed in the latest version then please add this to the deb repos.
> cheerz
Actually I think that's intended:
-2^4 = -16
(-2)^4 = 16
It seems to me -2^4 is calculated as -(2^4), and I think that's correct since
the power takes precedence. E.g., 4-2^2 should be 0 and not 8.
The same happens with git master.
Cheers,
Emilio
More information about the pkg-gnome-maintainers
mailing list