Index: src/math.js |
diff --git a/src/math.js b/src/math.js |
index 2da38779e7cc31a1f7fcd29c9c83e83f1cbdb7cd..83bca9348efd6294b5e606f2a4f8655ec8471e1b 100644 |
--- a/src/math.js |
+++ b/src/math.js |
@@ -57,7 +57,7 @@ function MathAtan2JS(y, x) { |
// ECMA 262 - 15.8.2.6 |
function MathCeil(x) { |
- return -MathFloor(-x); |
+ return -%_MathFloor(-x); |
} |
// ECMA 262 - 15.8.2.8 |
@@ -67,18 +67,7 @@ function MathExp(x) { |
// ECMA 262 - 15.8.2.9 |
function MathFloor(x) { |
- x = TO_NUMBER_INLINE(x); |
- // It's more common to call this with a positive number that's out |
- // of range than negative numbers; check the upper bound first. |
- if (x < 0x80000000 && x > 0) { |
- // Numbers in the range [0, 2^31) can be floored by converting |
- // them to an unsigned 32-bit value using the shift operator. |
- // We avoid doing so for -0, because the result of Math.floor(-0) |
- // has to be -0, which wouldn't be the case with the shift. |
- return TO_UINT32(x); |
- } else { |
- return %MathFloorRT(x); |
- } |
+ return %_MathFloor(+x); |
} |
// ECMA 262 - 15.8.2.10 |