circuitpython/tests/float/builtin_float_pow.py
Damien George bbb08431f3 py/objfloat: Fix case of raising 0 to -infinity.
It was raising an exception but it should return infinity.
2018-02-08 14:35:43 +11:00

12 lines
239 B
Python

# test builtin pow function with float args
print(pow(0.0, 0.0))
print(pow(0, 1.0))
print(pow(1.0, 1))
print(pow(2.0, 3.0))
print(pow(2.0, -4.0))
print(pow(0.0, float('inf')))
print(pow(0.0, float('-inf')))
print(pow(0.0, float('nan')))