This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients NathanFallet, mark.dickinson, serhiy.storchaka, steven.daprano
Date 2021-04-13.13:03:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618318986.42.0.232621156464.issue43830@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2021-04-13 13:03:06serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, steven.daprano, NathanFallet
2021-04-13 13:03:06serhiy.storchakasetmessageid: <1618318986.42.0.232621156464.issue43830@roundup.psfhosted.org>
2021-04-13 13:03:06serhiy.storchakalinkissue43830 messages
2021-04-13 13:03:05serhiy.storchakacreate