Silence compiler warning regarding float condition; fix #3790

parent 43ec918b
......@@ -2310,9 +2310,9 @@ RETRY_TRY_BLOCK:
mrb_int y = mrb_fixnum(regs[a+1]);
double f;
if (y == 0) {
if (x == 0) f = NAN;
else if (x > 0) f = INFINITY;
if (x > 0) f = INFINITY;
else if (x < 0) f = -INFINITY;
else /* if (x == 0) */ f = NAN;
}
else {
f = (mrb_float)x / (mrb_float)y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment