+ {
+ /*
+ underflow may not be raised correctly, example:
+ fmaf(0x1p-120f, 0x1p-120f, 0x1p-149f)
+ */
+#if defined(FE_INEXACT) && defined(FE_UNDERFLOW)
+ if (e < 0x3ff-126 && e >= 0x3ff-149 && fetestexcept(FE_INEXACT)) {
+ feclearexcept(FE_INEXACT);
+ /* TODO: gcc and clang bug workaround */
+ volatile float vz = z;
+ result = xy + vz;
+ if (fetestexcept(FE_INEXACT))
+ feraiseexcept(FE_UNDERFLOW);
+ else
+ feraiseexcept(FE_INEXACT);
+ }
+#endif
+ z = result;
+ return z;
+ }