Author mark.dickinson
Recipients eric.fahlgren, juraj.sukop, mark.dickinson, nschloe, pitrou, python-dev, serhiy.storchaka, skrah, vstinner
Date 2018-02-21.09:12:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519204344.06.0.467229070634.issue29282@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2018-02-21 09:12:24mark.dickinsonsetrecipients: + mark.dickinson, pitrou, vstinner, skrah, nschloe, python-dev, serhiy.storchaka, eric.fahlgren, juraj.sukop
2018-02-21 09:12:24mark.dickinsonsetmessageid: <1519204344.06.0.467229070634.issue29282@psf.upfronthosting.co.za>
2018-02-21 09:12:24mark.dickinsonlinkissue29282 messages
2018-02-21 09:12:23mark.dickinsoncreate