
Artyom: That's precisely the point. The true IEEE754 variants where
precision does matter should be part of a different class. What Edward and
Yitz want is an "optimized" multiply-add where the semantics is the same
but one that goes faster.
On Mon, May 4, 2015 at 10:40 AM, Artyom
On 05/04/2015 08:36 PM, Levent Erkok wrote:
In particular, the compiler should be free to substitute "a*b+c" with "mulAccum a b c".
But isn't it unacceptable in some cases? For instance, in this case (taken from Wikipedia):
If *x*2 − *y*2 is evaluated as ((*x*×*x*) − *y*×*y*) using fused multiply–add, then the result may be negative even when *x* = *y* due to the first multiplication discarding low significance bits. This could then lead to an error if, for instance, the square root of the result is then evaluated.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries