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

    Jan 20, 2022 · I need to calculate the square root of some numbers, for example √9 = 3 and √2 = 1.4142. How can I do it in Python? The inputs will probably be all positive integers, and …

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

    In Python this operation seems to be represented by the ** syntax. >>> 3**2 9 If I want to go the other direction and calculate the 2nd root of 9 then in maths I need to use a symbol: 2√9 = 3 Is …

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

    This is simply a question of how the underlying code actually works. What is the theory of how Python code works? I sent Guido van Rossum an email cause I really wanted to know the …

  4. Why does Python give the "wrong" answer for square root? What …

    It's not wrong, it's the right answer to a different question. If you want to calculate the square root without an import of the math module, you'll need to use x**(1.0/2) or x**(1/2.). One of the …

  5. How do I root in python (other than square root)? [duplicate]

    Jan 6, 2019 · I'm trying to make a calculator in python, so when you type x (root) y it will give you the x root of y, e.g. 4 (root) 625 = 5. I'm aware of how to do math.sqrt () but is there a way to …

  6. 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 …

  7. 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 …

  8. Square root of a number without math.sqrt - Stack Overflow

    Jul 17, 2017 · Why don't you want to use math.sqrt or one-half power? I see two main reasons to avoid that:when you need more precision than the 15-17 significant digits that math.sqrt and …

  9. Python- Square Root of list - Stack Overflow

    Mar 23, 2022 · Taking the square root of each number in a list. For this problem in the sqrt_list function: Take the square root of each item in the list, Store each squared item in another list, …

  10. How to find cube root using Python? - Stack Overflow

    Jan 18, 2015 · This takes the cube root of x, rounds it to the nearest integer, raises to the third power, and finally checks whether the result equals x. The reason to take the absolute value is …

Refresh