From: Szabolcs Nagy Date: Thu, 15 Aug 2013 10:13:02 +0000 (+0000) Subject: math: fix tgamma to raise underflow for large negative values X-Git-Tag: v0.9.13~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cd18dc8525a275323819ac4c7826cc3404202f7b;p=oweals%2Fmusl.git math: fix tgamma to raise underflow for large negative values --- diff --git a/src/math/tgamma.c b/src/math/tgamma.c index 691e86a4..f91af735 100644 --- a/src/math/tgamma.c +++ b/src/math/tgamma.c @@ -137,6 +137,7 @@ double tgamma(double x) /* x =< -184: tgamma(x)=+-0 with underflow */ if (absx >= 184) { if (x < 0) { + FORCE_EVAL((float)(0x1p-126/x)); if (floor(x) * 0.5 == floor(x * 0.5)) return 0; return -0.0;