[Python-ideas] Pre-PEP: adding a statistics module to Python
Joshua Landau
joshua at landau.ws
Mon Aug 5 08:15:18 CEST 2013
On 5 August 2013 06:55, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
> On 4 Aug, 2013, at 3:51, Steven D'Aprano <steve at pearwood.info> wrote:
>
> > On 04/08/13 05:47, Alexander Belopolsky wrote:
> >
> >> The PEP does not mention statistics.sum(), but the reference
> implementation
> >> includes it. I am not sure stdlib needs the third sum function after
> >> builtins.sum and math.fsum. I think it will be better to improve
> >> builtins.sum instead.
> >
> >
> > I don't know enough C to volunteer to do that. If the built-in sum() is
> improved to the point it passes my unit tests, I would consider using it in
> the future.
>
> Does math.fsum pass your tests? From the description and references to the
> cookbook it seems that your sum is functionally equivalent to math.fsum.
>
math.fsum casts to floats, so no¹.
¹ Just an educated guess based off of his previous comments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130805/ff8b4e0e/attachment.html>
More information about the Python-ideas
mailing list