Charles R Harris wrote:

[CHOP]
> On 9/22/06, *Tim Hochberg* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
>     It sounds like there is some consensus to do something to improve the
>     precision after 1.0 comes out. I don't think the details are entirely
>     nailed down, but it sounds like some combination of using Kahan
>     summation and increasing the minimum precision of the accumulator is
>     likely for sum, mean, var and std. 
>
>
> I would go with double as the default except when the base precision 
> is greater. Higher precisions should be available as a check, i.e., if 
> the results look funny use Kahan or extended to see if roundoff is a 
> problem. I think Kahan should be available because it adds precision 
> to *any* base precision, even extended or quad, so there is always 
> something to check against. But I don't think Kahan should be the 
> default because of the speed hit.
>
Note that add.reduce will be available for doing simple-fast-reductions, 
so I consider some speed hit as acceptable. I'll be interested to see 
what the actual speed difference between Kahan and straight summation 
actually are.  It may also be possible to unroll the core loop cleverly 
so that multiple ops can be scheduled on the FPU in parallel. It doesn't 
look like naive unrolling will work since each iteration depends on the 
values of the previous one. However, it probably doesn't matter much 
where the low order bits get added back in, so there's some flexibility 
in how the loop gets unrolled.

-tim

PS. Sorry about the untrimmed posts.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to