I play with some big values ββwith Java and I come across something that I don't understand. For some reason, Java seems to like giving me bum data (although, most likely, I am telling it to give me bum data).
Here's a snippet edited for clarity:
System.out.println( "2 == " + (Math.pow(51, 13) % (77)) );
Which, according to both Wolfram Alpha (see link below), and the rest of my algorithm is incorrect.
(Output:)
2 == 70.0
http://www.wolframalpha.com/input/?i=51^13+mod+77
Any ideas?
source share