When I try to calculate the expression: (126^317) MOD 437 the result is: 412. This value is wrong.
The real value for this expression must be: 65.
this calculation overflows with common floating point arithmetics, see for example
There are special algorithms to solve "(126^317) MOD 437" (there has to be, as RSA en/decryption relies on this). However, such special algorithms are out of scope for galculator.
What is in scope for galculator is a warning, when a computation overflows. This is on galculator's todo list and will be part of the next release.
Thanks for reply.
I've reported this as Bug, because the calculator of Windows 8 did this operation correctly. (Maybe it implements these algorithms)
I think this operation in the calculator should result in zero value or show a error message (I don't know).
I'm trying to resolve my homework about RSA encryption algorithms with galculator, but now I see that its not possible.
I'll be happy if galculator do this operations in the future.
I've to correct myself on this. The problem is not "overflowing", as we are computing with floating point numbers. The problem is "loss of precision", as we have too few significant digits to represent the result of the power operation precisely. We would need to use a library for arbitrary precision arithmetic such as gmp. This is on the wishlist, but will bot make its way into galculator soon.