Special handling for base -1, 0, 1 for big exp

This commit is contained in:
Jeong YunWon committed 2019-05-02 23:11:00 +09:00
1 parent c18615b6e5
commit 0bf7ff96b8
2 files changed
+21 -6

No files matched your search

+5
View File
@@ -39,9 +39,14 @@ assert_raises(
lambda: round(-float('inf')),
'OverflowError: cannot convert float NaN to integer')
assert pow(0, 0) == 1
assert pow(2, 2) == 4
assert pow(1, 2.0) == 1.0
assert pow(2.0, 1) == 2.0
assert pow(0, 10**1000) == 0
assert pow(1, 10**1000) == 1
assert pow(-1, 10**1000+1) == -1
assert pow(-1, 10**1000) == 1
assert pow(2, 4, 5) == 1
assert_raises(