I'm doing mod for big number in python 2.7.3
and python is giving me wrong answer as shown below. If number is small, then it gives correct answer.
Can anybody explain why this happens and how I can fix in python?? below simple script showing small number mod shows correct answer but big number mod gives wrong answer.
root# cat mod.py
bigNum=46623871433466988486147975697094761425185742805822717249007
smallNum=717249007
print "bigNum % 3: " + str(bigNum % 3)
print "smallNum % 3: " + str(smallNum % 3)
root# python mod.py
bigNum % 3: 0
smallNum % 3: 1
Appreciate for help in advance.