diff options
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -446,7 +446,7 @@ math_log(int argc, VALUE *argv) rb_scan_args(argc, argv, "11", &x, &base); - if (RB_BIGNUM_TYPE_P(x) && RBIGNUM_POSITIVE_P(x) && + if (RB_BIGNUM_TYPE_P(x) && BIGNUM_POSITIVE_P(x) && DBL_MAX_EXP <= (numbits = rb_absint_numwords(x, 1, NULL))) { numbits -= DBL_MANT_DIG; x = rb_big_rshift(x, SIZET2NUM(numbits)); @@ -506,7 +506,7 @@ math_log2(VALUE obj, VALUE x) double d0, d; size_t numbits; - if (RB_BIGNUM_TYPE_P(x) && RBIGNUM_POSITIVE_P(x) && + if (RB_BIGNUM_TYPE_P(x) && BIGNUM_POSITIVE_P(x) && DBL_MAX_EXP <= (numbits = rb_absint_numwords(x, 1, NULL))) { numbits -= DBL_MANT_DIG; x = rb_big_rshift(x, SIZET2NUM(numbits)); @@ -548,7 +548,7 @@ math_log10(VALUE obj, VALUE x) double d0, d; size_t numbits; - if (RB_BIGNUM_TYPE_P(x) && RBIGNUM_POSITIVE_P(x) && + if (RB_BIGNUM_TYPE_P(x) && BIGNUM_POSITIVE_P(x) && DBL_MAX_EXP <= (numbits = rb_absint_numwords(x, 1, NULL))) { numbits -= DBL_MANT_DIG; x = rb_big_rshift(x, SIZET2NUM(numbits)); |