mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
py/objfloat: Fix case of raising 0 to -infinity.
It was raising an exception but it should return infinity.
This commit is contained in:
11
tests/float/builtin_float_pow.py
Normal file
11
tests/float/builtin_float_pow.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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')))
|
||||
Reference in New Issue
Block a user