About 13,800,000 results
Open links in new tab
  1. How to represent an infinite number in Python? - Stack Overflow

    Oct 15, 2011 · How can I represent an infinite number in python? No matter which number you enter in the program, no number should be greater than this representation of infinity.

  2. How to compare floats for almost-equality in Python?

    541 Python 3.5 adds the math.isclose and cmath.isclose functions as described in PEP 485. If you're using an earlier version of Python, the equivalent function is given in the documentation.

  3. What does the ** maths operator do in Python? - Stack Overflow

    What does this mean in Python: sock.recvfrom(2**16) I know what sock is, and I get the gist of the recvfrom function, but what the heck is 2**16? Specifically, the two asterisk/double asterisk ope...

  4. math - How can I convert radians to degrees with Python ... - Stack ...

    Mar 26, 2012 · 235 Python includes two functions in the math package; radians converts degrees to radians, and degrees converts radians to degrees. To match the output of your calculator …

  5. Function for factorial in Python - Stack Overflow

    Feb 27, 2011 · Starting with Python 3.9, passing a float to this function will raise a DeprecationWarning. If you want to do that, you need to convert n to an int explicitly: …

  6. python - How can I use "e" (Euler's number) and power operation ...

    Aug 25, 2016 · How can I write 1-e^ (-value1^2/2*value2^2) in Python? I don't know how to use power operator and e.

  7. How to implement negative infinity in Python? - Stack Overflow

    Mar 2, 2013 · How to implement negative infinity in Python? Asked 12 years, 11 months ago Modified 1 year, 4 months ago Viewed 42k times

  8. python - How do you round UP a number? - Stack Overflow

    May 5, 2017 · Elaboration: math.ceil returns the smallest integer which is greater than or equal to the input value. This function treats the input as a float (Python does not have strongly-typed …

  9. Python math module - Stack Overflow

    How are you importing math? I just tried import math and then math.sqrt which worked perfectly. Are you doing something like import math as m? If so, then you have to prefix the function with …

  10. logarithm - Log to the base 2 in python - Stack Overflow

    Sep 15, 2010 · As to clarify math.log(x[, base]): Square brackets in documentation often indicate optional arguments.