How To Take Square Root Of Large Numbers In Python 2?
I am trying to check if a large number is a perfect square. Here is the corresponding part of my code: x = long(raw_input()) a = sqrt(5 * x ** 2 + 4) b = sqrt(5 * x **2 - 4) if lon
Solution 1:
Use the decimal module to take the square root of large numbers.
Post a Comment for "How To Take Square Root Of Large Numbers In Python 2?"