math: add fma TODO comments about the underflow issue

The underflow exception is not raised correctly in some
cornercases (see previous fma commit), added comments
with examples for fmaf, fmal and non-x86 fma.

In fmaf store the result before returning so it has the
correct precision when FLT_EVAL_METHOD!=0
This commit is contained in:
Szabolcs Nagy 2013-05-19 14:43:32 +00:00
commit 1e5eb73545
3 changed files with 14 additions and 2 deletions

View file

@ -262,6 +262,8 @@ long double fmal(long double x, long double y, long double z)
/*
* There is no need to worry about double rounding in directed
* rounding modes.
* TODO: underflow is not raised correctly, example in downward rounding:
* fmal(0x1.0000000001p-16000L, 0x1.0000000001p-400L, -0x1p-16440L)
*/
fesetround(oround);
adj = r.lo + xy.lo;