mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
update sum testcase
This commit is contained in:
parent
f838795c01
commit
f1914eb723
@ -14,7 +14,6 @@ assert math.floor(math.pi) == 3.0
|
||||
assert math.floor(-math.e) == -3.0
|
||||
assert math.trunc(math.pi) == 3.0
|
||||
|
||||
assert math.fsum([math.pi]*100) == 314.159265358979323846
|
||||
assert math.gcd(10, 5) == 5
|
||||
assert math.gcd(10, 6) == 2
|
||||
assert math.gcd(10, 7) == 1
|
||||
@ -75,6 +74,9 @@ assert math.atan2(-math.pi/4, math.pi/4) == -0.7853981633974483
|
||||
assert math.atan2(-math.pi/4, -math.pi/4) == -2.356194490192345
|
||||
assert math.atan2(math.pi/4, -math.pi/4) == 2.356194490192345
|
||||
|
||||
assert math.fsum([math.sin(i) for i in range(5000)] + [math.cos(i) for i in range(5000, 9999)]) == 3.217215564632461 - 4.440892098500626e-16
|
||||
assert sum([math.sin(i) for i in range(5000)] + [math.cos(i) for i in range(5000, 9999)]) == 3.21721556463248
|
||||
|
||||
assert math.fmod(-2.0, 3.0) == -2.0
|
||||
assert math.fmod(2.0, 3.0) == 2.0
|
||||
assert math.fmod(4.0, 3.0) == 1.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user