At 07:22 AM 7/25/2014, you wrote:
> We were talking on this in
the office, as we
> realized it does affect a couple of lines dealing
> with large arrays, including complex64.
> As I expect Python modules to work uniformly
> cross platform unless documented otherwise, to me
> that includes 32 vs 64 bit platforms, implying
> that the modules should automatically use large
> enough accumulators for the data type input.
The 32/64-bitness of your platform has nothing to do with floating
point.
As a naive end user, I can, and do, download different binaries for
different CPUs/Windows versions and will get different results
http://mail.scipy.org/pipermail/numpy-discussion/2014-July/070747.html
Nothing discussed in
this thread is platform-specific (modulo
some minor details about the hardware FPU, but that should be taken
as
read).
And compilers, apparently.
The important point was that it would be best if all of the methods
affected by summing 32 bit floats with 32 bit accumulators had the same
Notes as numpy.mean(). We went through a lot of code yesterday, assuming
that any numpy or Scipy.stats functions that use accumulators suffer the
same issue, whether noted or not, and found it true.
"Depending on the input data, this can cause the results to be
inaccurate, especially for float32 (see example below).
Specifying a higher-precision accumulator using the
dtype keyword can alleviate this issue." seems rather
un-Pythonic.
- Ray