After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 587669 - MOD operation returns the wrong value (when using huge numbers)
MOD operation returns the wrong value (when using huge numbers)
Status: RESOLVED DUPLICATE of bug 611970
Product: gnome-calculator
Classification: Core
Component: general
5.26.x
Other All
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-03 08:58 UTC by Yan
Modified: 2010-04-09 01:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Yan 2009-07-03 08:58:47 UTC
Please describe the problem:
When I perform some operation using the 'modulus' division (%) with huge numbers, I often obtain wrong results.

Here, I give an example:

"2^1000 Mod 3" returns an 86-digit result!!
Obviously, it is not the correct answer (the result must be: 0<=result<=2)

Steps to reproduce:
1. Type "2^1000 Mod 3"
2. Press "ENTER"


Actual results:
The result is not correct: it can not be a number of 86-digit!

Expected results:
As a result, I expect a number n, such that 0<=n<=2, because I use (mod 3).

Does this happen every time?
Yes

Other information:
Comment 1 Robert Ancell 2009-08-02 15:56:01 UTC
Also reported in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/394724
Comment 2 Robert Ancell 2010-04-09 01:40:21 UTC

*** This bug has been marked as a duplicate of bug 611970 ***