pow()

pow(x,y) returns x raised to the power of y ( input numbers ) .
Here are some examples with different type of numbers.
import math
print(math.pow(2,3))   # 8.0
print(math.pow(2,-3))  # 0.125
print(math.pow(-2,-3)) # -0.125
print(math.pow(-2,3))  # -8.0
Using floats
import math
print(math.pow(2.2,3))   # 10.648000000000003
print(math.pow(2.2,-3))  # 0.09391435011269719
x is negative, and y is not an integer then pow(x, y) is undefined and raise ValueError.
print(math.pow(-2,3.3)) 
print(math.pow(-2,3.3)) 
Above code will generate error

floor() & ceil() modf() powm1()


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer