diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-17 10:34:28 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-17 10:34:28 +0900 |
| commit | 74e531ecabe07bfe987e32ff52d2239810d74617 (patch) | |
| tree | ec6489935b28c8b0040afb1f89846ed6523b6570 | |
| parent | 470da1eda075017d72ed085bcd0b9303080334f3 (diff) | |
| download | mruby-74e531ecabe07bfe987e32ff52d2239810d74617.tar.gz mruby-74e531ecabe07bfe987e32ff52d2239810d74617.zip | |
avoid isfinite() in num_pow
| -rw-r--r-- | src/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c index c005e519e..cddd7af27 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -108,7 +108,7 @@ num_pow(mrb_state *mrb, mrb_value x) mrb_get_args(mrb, "o", &y); if (FIXNUM_P(x) && FIXNUM_P(y)) both_int = TRUE; d = pow(mrb_to_flo(mrb, x), mrb_to_flo(mrb, y)); - if (both_int && isfinite(d) && FIXABLE(d)) + if (both_int && FIXABLE(d)) return mrb_fixnum_value((mrb_int)d); return mrb_float_value(d); } |
