diff options
author | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-14 11:16:05 +0000 |
---|---|---|
committer | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-14 11:16:05 +0000 |
commit | 09d9d913c05a99ec972cfca4fce80ac46e6e8965 (patch) | |
tree | dfe35b2559f002c881b5bbcd23c1f7e6a7fec044 /math.c | |
parent | 0e749ddedc100e88dad9fb367ade2e56bbf8f785 (diff) | |
download | ruby-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]); } } |