ruby-changes:37888
From: gogotanaka <ko1@a...>
Date: Sat, 14 Mar 2015 20:16:23 +0900 (JST)
Subject: [ruby-changes:37888] gogotanaka:r49969 (trunk): * math.c (math_gamma): explicit cast to double.
gogotanaka 2015-03-14 20:16:05 +0900 (Sat, 14 Mar 2015) New Revision: 49969 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49969 Log: * math.c (math_gamma): explicit cast to double. Modified files: trunk/math.c Index: math.c =================================================================== --- math.c (revision 49968) +++ math.c (revision 49969) @@ -875,7 +875,7 @@ math_gamma(VALUE obj, VALUE x) https://github.com/ruby/ruby/blob/trunk/math.c#L875 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]); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/