summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorgogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-14 11:16:05 +0000
committergogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-14 11:16:05 +0000
commit09d9d913c05a99ec972cfca4fce80ac46e6e8965 (patch)
treedfe35b2559f002c881b5bbcd23c1f7e6a7fec044 /math.c
parent0e749ddedc100e88dad9fb367ade2e56bbf8f785 (diff)
downloadruby-09d9d913c05a99ec972cfca4fce80ac46e6e8965.tar.gz
* math.c (math_gamma): explicit cast to double.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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]);
}
}