Index: src/harmony-math.js |
diff --git a/src/harmony-math.js b/src/harmony-math.js |
index 2bf33d63f2c81b26263abffea9e931bb9a60008e..652e8aeb75db1757327a3044974a3ed79da48029 100644 |
--- a/src/harmony-math.js |
+++ b/src/harmony-math.js |
@@ -110,6 +110,18 @@ function MathAtanh(x) { |
} |
+//ES6 draft 09-27-13, section 20.2.2.21. |
+function MathLog10(x) { |
+ return MathLog(x) * 0.434294481903251828; // log10(x) = log(x)/log(10). |
+} |
+ |
+ |
+//ES6 draft 09-27-13, section 20.2.2.22. |
+function MathLog2(x) { |
+ return MathLog(x) * 1.442695040888963407; // log2(x) = log(x)/log(2). |
+} |
+ |
+ |
function ExtendMath() { |
%CheckIsBootstrapping(); |
@@ -122,7 +134,9 @@ function ExtendMath() { |
"tanh", MathTanh, |
"asinh", MathAsinh, |
"acosh", MathAcosh, |
- "atanh", MathAtanh |
+ "atanh", MathAtanh, |
+ "log10", MathLog10, |
+ "log2", MathLog2 |
)); |
} |