0

I want to find out an integer part of a square root of a number on python with pylab expansion However, long(sqrt(n)) does not work on large integers. Is there any way to find a integer part of square root of a very large number very quickly? I'm new to python and programming. All I know is while loops and if statements. Thank you

1 Answers1

0
In [12]: x=10000000000000000000000000000000000000000000000000000000

In [13]: int(x**0.5)
Out[13]: 3162277660168379365112938496L

In [14]: long(x**0.5)
Out[14]: 3162277660168379365112938496L

Did I understand your question correctly?

Caleb Hattingh
  • 9,005
  • 2
  • 31
  • 44