Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index d804979d2e3927e1affde0146643f534e96fdf07..9b12e7a4a7fa4226a8112c278e72a092bc960e9f 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -7263,19 +7263,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow) { |
} |
CONVERT_DOUBLE_ARG_CHECKED(y, 1); |
- int y_int = static_cast<int>(y); |
- double result; |
- if (y == y_int) { |
- result = power_double_int(x, y_int); // Returns 1 if exponent is 0. |
- } else if (y == 0.5) { |
- result = (isinf(x)) ? V8_INFINITY |
- : fast_sqrt(x + 0.0); // Convert -0 to +0. |
- } else if (y == -0.5) { |
- result = (isinf(x)) ? 0 |
- : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0. |
- } else { |
- result = power_double_double(x, y); |
- } |
+ double result = power_helper(x, y); |
if (isnan(result)) return isolate->heap()->nan_value(); |
return isolate->heap()->AllocateHeapNumber(result); |
} |