mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
avoid isfinite() in num_pow
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user