Author vstinner
Recipients aleax, mark.dickinson, remi.lapeyre, rhettinger, serhiy.storchaka, tim.peters, vstinner, xtreak
Date 2019-01-04.22:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Computing the geometric mean of numbers require to compute the product of these numbers:

The geometric mean can be used to summarize benchmark results using different units to get a single number.


When computing the product of floats, is there a smart implementation reducing the error? I'm asking because math.fsum() doesn't use a naive loop but a smart implementation to minimize the error.


Mark Dickinson:
> On this subject, some effort has been made in the past to make (almost) all the math module functions behave consistently with respect to things like exceptions, overflow, infinities, nans, signed zeros, etc.


RĂ©mi Lapeyre:
> A naive implementation would also support user-defined types which would probably be a good thing IMO

Would it make sense to only implement product for an iterable of floats, as math.fsum()?
Date User Action Args
2019-01-04 22:03:47vstinnersetrecipients: + vstinner, tim.peters, aleax, rhettinger, mark.dickinson, serhiy.storchaka, remi.lapeyre, xtreak
2019-01-04 22:03:45vstinnersetmessageid: <>
2019-01-04 22:03:45vstinnerlinkissue35606 messages
2019-01-04 22:03:45vstinnercreate