Skip to content

Commit da03c14

Browse files
authored
Fix accuracy in maclaurin_series on Python 3.12 (TheAlgorithms#9581)
1 parent 0f4e512 commit da03c14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

maths/maclaurin_series.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def maclaurin_sin(theta: float, accuracy: int = 30) -> float:
2121
>>> maclaurin_sin(-10)
2222
0.5440211108893704
2323
>>> maclaurin_sin(10, 15)
24-
-0.5440211108893689
24+
-0.544021110889369
2525
>>> maclaurin_sin(-10, 15)
26-
0.5440211108893703
26+
0.5440211108893704
2727
>>> maclaurin_sin("10")
2828
Traceback (most recent call last):
2929
...
@@ -73,7 +73,7 @@ def maclaurin_cos(theta: float, accuracy: int = 30) -> float:
7373
>>> maclaurin_cos(-5)
7474
0.2836621854632265
7575
>>> maclaurin_cos(10, 15)
76-
-0.8390715290764525
76+
-0.8390715290764524
7777
>>> maclaurin_cos(-10, 15)
7878
-0.8390715290764521
7979
>>> maclaurin_cos("10")

0 commit comments

Comments
 (0)