About 371,000 results
Open links in new tab
  1. How do I calculate square root in Python? - Stack Overflow

    Jan 20, 2022 · Python sqrt limit for very large numbers? square root of a number greater than 10^2000 in Python 3 Which is faster in Python: x**.5 or math.sqrt (x)? Why does Python give …

  2. Is there a short-hand for nth root of x in Python? - Stack Overflow

    There is. It's just ** =) Any nth root is an exponentiation by 1/n, so to get the square root of 9, you use 9**(1/2) (or 9**0.5) to get the cube root, you use 9 ** (1/3) (which we can't write with a …

  3. How to perform square root without using math module?

    Jun 15, 2010 · I want to find the square root of a number without using the math module,as i need to call the function some 20k times and dont want to slow down the execution by linking to the …

  4. math - Integer square root in python - Stack Overflow

    Mar 13, 2013 · Is there an integer square root somewhere in python, or in standard libraries? I want it to be exact (i.e. return an integer), and raise an exception if the input isn't a perfect …

  5. performance - Which is faster in Python: x**.5 or math.sqrt (x ...

    8 In python 2.6 the (float).__pow__() function uses the C pow() function and the math.sqrt() functions uses the C sqrt() function. In glibc compiler the implementation of pow(x,y) is quite …

  6. python - What is the most efficient way of doing square root of …

    Jun 28, 2018 · I am looking for the more efficient and shortest way of performing the square root of a sum of squares of two or more numbers. I am actually using numpy and this code: …

  7. square root - Python sqrt limit for very large numbers? - Stack …

    Jan 31, 2015 · y = 10 * sqrt(70.707e2) A few notes: Python handles ridiculously large integer numbers without problems. For floating point numbers, it uses standard (C) conventions, and …

  8. Writing your own square root function - Stack Overflow

    Oct 26, 2009 · How do you write your own function for finding the most accurate square root of an integer? After googling it, I found this (archived from its original link), but first, I didn't get it …

  9. python - Babylonian square root iterations - Stack Overflow

    Background: The Babylonians used an iterative method to calculate square roots by hand as early as 1500 BC. Here are the steps to find the square root of a positive number n: Start with an …

  10. Time complexity of Python 3.8+'s integer square root `math.isqrt ...

    Feb 26, 2024 · I am trying to analyze the time complexity of the default integer square root function in Python 3.8+ versions, math.isqrt() I have tried to peruse the time complexity of this …