diff --git a/math.c b/math.c index 3a4ed735a97e80..e4577163451112 100644 --- a/math.c +++ b/math.c @@ -542,7 +542,7 @@ math_gamma(VALUE obj, VALUE x) * the sign of gamma of x. * * Math.lgamma(x) is same as - * [Math.log(Math.gamma(x)), Math.gamma(x) < 0 ? -1 : 1] + * [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1] * but avoid overflow by Math.gamma(x) for large x. */