Message390961
It is the same "gotcha" as
>>> math.cos(math.pi/2)
6.123233995736766e-17
You can expect that cos(π/2) is exactly 0, but floating point value math.pi is only an approximation of the π number. The difference between math.pi and exact value of π leads to non-zero result of cos(math.pi/2). |
|
Date |
User |
Action |
Args |
2021-04-13 13:03:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson, steven.daprano, NathanFallet |
2021-04-13 13:03:06 | serhiy.storchaka | set | messageid: <1618318986.42.0.232621156464.issue43830@roundup.psfhosted.org> |
2021-04-13 13:03:06 | serhiy.storchaka | link | issue43830 messages |
2021-04-13 13:03:05 | serhiy.storchaka | create | |
|