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 mark.dickinson
Recipients Jeffrey.Kintscher, mark.dickinson, pablogsal, rhettinger, tim.peters, veky
Date 2020-08-06.11:13:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596712418.98.0.589571995229.issue41458@roundup.psfhosted.org>
In-reply-to
Content
If we want to do this (and I'm still not convinced that we do), I think there's a simpler way: use `frexp` to decompose each float into a fraction and an exponent, multiply the fractions (which barring zeros will all be in [0.5, 1.0)), and keep track of the accumulated exponents separately. Then combine everything at the end.

There's a possibility of the accumulated product of the fractions underflowing, but only every 1000 floats or so, so it's enough to check every 500 floats (say) whether the product is smaller than 2**-500 or not, and scale by 2**1000 (adjusting the exponent correspondingly) if not.
History
Date User Action Args
2020-08-06 11:13:39mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, veky, pablogsal, Jeffrey.Kintscher
2020-08-06 11:13:38mark.dickinsonsetmessageid: <1596712418.98.0.589571995229.issue41458@roundup.psfhosted.org>
2020-08-06 11:13:38mark.dickinsonlinkissue41458 messages
2020-08-06 11:13:38mark.dickinsoncreate