mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
Fix accuracy in maclaurin_series on Python 3.12
This commit is contained in:
parent
0f4e51245f
commit
f781e34f7d
|
@ -21,7 +21,7 @@ def maclaurin_sin(theta: float, accuracy: int = 30) -> float:
|
||||||
>>> maclaurin_sin(-10)
|
>>> maclaurin_sin(-10)
|
||||||
0.5440211108893704
|
0.5440211108893704
|
||||||
>>> maclaurin_sin(10, 15)
|
>>> maclaurin_sin(10, 15)
|
||||||
-0.5440211108893689
|
-0.544021110889369
|
||||||
>>> maclaurin_sin(-10, 15)
|
>>> maclaurin_sin(-10, 15)
|
||||||
0.5440211108893703
|
0.5440211108893703
|
||||||
>>> maclaurin_sin("10")
|
>>> maclaurin_sin("10")
|
||||||
|
@ -73,7 +73,7 @@ def maclaurin_cos(theta: float, accuracy: int = 30) -> float:
|
||||||
>>> maclaurin_cos(-5)
|
>>> maclaurin_cos(-5)
|
||||||
0.2836621854632265
|
0.2836621854632265
|
||||||
>>> maclaurin_cos(10, 15)
|
>>> maclaurin_cos(10, 15)
|
||||||
-0.8390715290764525
|
-0.8390715290764524
|
||||||
>>> maclaurin_cos(-10, 15)
|
>>> maclaurin_cos(-10, 15)
|
||||||
-0.8390715290764521
|
-0.8390715290764521
|
||||||
>>> maclaurin_cos("10")
|
>>> maclaurin_cos("10")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user