summaryrefslogtreecommitdiff
path: root/lib/libm/tgammal.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/tgammal.c')
-rw-r--r--lib/libm/tgammal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libm/tgammal.c b/lib/libm/tgammal.c
index 1ebbfab8..54270091 100644
--- a/lib/libm/tgammal.c
+++ b/lib/libm/tgammal.c
@@ -48,7 +48,10 @@
*
*/
-#include "libm.h"
+#include "libm.h" // for __polevll
+
+#include <float.h> // for LDBL_MANT_DIG, LDBL_MAX_EXP
+#include <math.h> // for fabsl, floorl, powl, expl, sinl, tgammal, INFINITY
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double tgammal(long double x)
@@ -250,7 +253,7 @@ long double tgammal(long double x)
small:
/* z==1 if x was originally +-0 */
if (x == 0 && z != 1)
- return x / x;
+ return NAN;
if (x < 0.0) {
x = -x;
q = z / (x * __polevll(x, SN, 8));