Eelco Hoogendoorn

2014-07-25 03:37:49 UTC

Perhaps it is a slightly semantical discussion; but all fp calculations have errors, and there are always strategies for making them smaller. We just don't happen to like the error for this case; but rest assured it won't be hard to find new cases of 'blatantly wrong' results, no matter what accumulator is implemented. That's no reason to not try and be clever about it, but there isn't going to be an algorithm that is best for all possible inputs, and in the end the most important thing is that the algorithm used is specified in the docs.

-----Original Message-----

From: "Alan G Isaac" <***@gmail.com>

Sent: â25-â7-â2014 00:10

To: "Discussion of Numerical Python" <numpy-***@scipy.org>

Subject: Re: [Numpy-discussion] numpy.mean still broken for largefloat32arrays

can certainly be computed as a float32. Currently this is

not necessarily what happens, not even approximately.

That feels a lot like a bug, even if we can readily understand

how the algorithm currently used produces it. To say whether

it is a bug or not, don't we have to ask about the intent of `mean`?

If the intent is to sum and divide, then it is not a bug.

If the intent is to produce the mean, then it is a bug.

Alan Isaac

-----Original Message-----

From: "Alan G Isaac" <***@gmail.com>

Sent: â25-â7-â2014 00:10

To: "Discussion of Numerical Python" <numpy-***@scipy.org>

Subject: Re: [Numpy-discussion] numpy.mean still broken for largefloat32arrays

This isn't a bug report, but rather a feature request.

I'm not sure statement this is correct. The mean of a float32 arraycan certainly be computed as a float32. Currently this is

not necessarily what happens, not even approximately.

That feels a lot like a bug, even if we can readily understand

how the algorithm currently used produces it. To say whether

it is a bug or not, don't we have to ask about the intent of `mean`?

If the intent is to sum and divide, then it is not a bug.

If the intent is to produce the mean, then it is a bug.

Alan Isaac