About 32,500 results
Open links in new tab
  1. math - How do I do exponentiation in python? - Stack Overflow

    Jan 8, 2017 · How do I do exponentiation in python? [duplicate] Asked 10 years, 7 months ago Modified 1 year, 4 months ago Viewed 95k times

  2. python - Exponent-Characters shown in string - Stack Overflow

    May 29, 2015 · 1 I'm looking for a way, to generate a string, that contains for example "x³". If I don't know the exponent (3), and I want to add it to the string, like this: "x^"+"3" doesn't work (of course). Is there …

  3. Exponentials in python: x**y vs math.pow(x, y) - Stack Overflow

    Jan 7, 2014 · Most programming languages, including Python, adhere to this. Basically the only one breaking this convention is Microsoft Excel. If you use parentheses in Python, it yields alternating …

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

  5. python - How do you print superscript? - Stack Overflow

    0 Your Python program is probably running as a console application which can only output characters w/o formatting. The simple answer to your question is "you can't do it".

  6. Exponentiation in Python - should I prefer - Stack Overflow

    64 math.sqrt is the C implementation of square root and is therefore different from using the ** operator which implements Python's built-in pow function. Thus, using math.sqrt actually gives a different …

  7. math - How do I pass a fraction to python as an exponent in order to ...

    Jun 19, 2011 · 5 I'm attempting to write a simple python script that will calculate the squareroot of a number. heres the code i've come up with and it works. but i would like to learn how to use fractional …

  8. python - Creating a function to print the exponents without using ...

    Jul 11, 2020 · I'm tasked with writing a function in Python 3 to essentially recreate the ** command for the powers of 2, given a number (eg- if n = 10, print out 1,2,4...1024). I can't use any predefined …

  9. python - How to square or raise to a power (elementwise) a 2D numpy ...

    Sep 16, 2014 · 88 The fastest way is to do a*a or a**2 or np.square(a) whereas np.power(a, 2) showed to be considerably slower. np.power() allows you to use different exponents for each element if …

  10. python - What does the caret (^) operator do? - Stack Overflow

    Side note, seeing as Python defines this as an xor operation and the method name has "xor" in it, I would consider it a poor design choice to make that method do something not related to xor like …