summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.c b/math.c
index 6590121..b4cdeef 100644
--- a/math.c
+++ b/math.c
@@ -875,7 +875,7 @@ math_gamma(VALUE obj, VALUE x)
if (isinf(d) && signbit(d)) domain_error("gamma");
if (d == floor(d)) {
if (d < 0.0) domain_error("gamma");
- if (1.0 <= d && d <= NGAMMA_TABLE) {
+ if (1.0 <= d && d <= (double)NGAMMA_TABLE) {
return DBL2NUM(fact_table[(int)d - 1]);
}
}