GNOME Bugzilla – Bug 696986
Wrong answer during modulo calculations
Last modified: 2013-05-20 11:13:26 UTC
When using gnome-calculator to calculate the following (10^(223728)) mod 1234567891 the gnome calculator incorrectly (and without any indication something went wrong) gives back the answer 0. The correct answer however should be 83494518 Im running 64-bit ubuntu 12.10 on an HP pavilion dv6 laptop containing an intel core i3 M 350 presenting 4 cores to the system
The error lies not in the operation itself, but in the fact that 10^(223728) is a number too big for gnome-calculator to handle. Indeed, writing 10^(223728) and pressing enter returns 0 (as it does for much smaller inputs, like 10^1000).
10^223728 is not too large for the gnome-calculator. Using my default settings it just displays as 1*10^223728 after pressing enter and some significant wait (I use scientific as number format)
Created attachment 244732 [details] [review] Fixed modulo calculations.
Review of attachment 244732 [details] [review]: Committed.. Thank you. :)
Created attachment 244735 [details] [review] Added fix for negative exponents.
Review of attachment 244735 [details] [review]: Committed.. Thank you.. :)