I came around a very strange issue when trying to find the 2^64 in java and in python.
In java, 2^64 is producing output 18446744073709552000.000000
~ while in python its producing 18446744073709551616
.
And the correct answer is the one that is produced by python script. i.e. 18446744073709551616
Can someone help me to understand this weird behaviour?
Python:
print(pow(2,64)); //18446744073709551616
Java:
System.out.printf("%f",Math.pow(2,64)); //8446744073709552000.000000