Mark Dickinson <dicki...@gmail.com> added the comment:

> Is this because of the inf/NaN discrimination hiccups [...]

No, more than that. If it were just that, we could work around it by adding the 
appropriate special case handling before calling the libm fma (as has been 
done, reluctantly, with some of the other math module functions; see the source 
for math.pow, for example).

But the fma implementation on Windows is fundamentally broken. For finite 
numbers, it simply doesn't give what it's supposed to (a * b + c, computed with 
a _single_ rounding). Since that single rounding is most of the point of fma, 
that makes the libm fma not fit for purpose on Windows.

It _is_ possible, with care, to code up a not-too-inefficient fma emulation 
using clever tricks like Veltkamp splitting and Dekker multiplication. I have 
half such an implementation sitting on my home computer, but so far have not 
had the cycles to finish it (and it's not high on the priority list right now).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29282>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to