From 1e5eb73545ca6cfe8b918798835aaf6e07af5beb Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 19 May 2013 14:43:32 +0000 Subject: 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 --- src/math/fma.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/math/fma.c') diff --git a/src/math/fma.c b/src/math/fma.c index 89def795..850a4a6c 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -441,6 +441,8 @@ double fma(double x, double y, double z) /* * There is no need to worry about double rounding in directed * rounding modes. + * TODO: underflow is not raised properly, example in downward rounding: + * fma(0x1.000000001p-1000, 0x1.000000001p-30, -0x1p-1066) */ fesetround(oround); adj = r.lo + xy.lo; -- cgit v1.2.1