summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.c b/math.c
index 659012148a..b4cdeef429 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]);
}
}