Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: src/math.js

Issue 786823003: Implement Math.log2 via ported extract from fdlibm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/third_party/fdlibm/fdlibm.h » ('j') | src/third_party/fdlibm/fdlibm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/math.js
diff --git a/src/math.js b/src/math.js
index a8c42f47a96c6a70c9dc895f354c44d84ded0ed1..cc478d344895361648b0bdba55a7bc5a96822e8d 100644
--- a/src/math.js
+++ b/src/math.js
@@ -227,11 +227,6 @@ function MathAtanh(x) {
return 0.5 * MathLog((1 + x) / (1 - x));
}
-// ES6 draft 09-27-13, section 20.2.2.22.
-function MathLog2(x) {
- return MathLog(x) * 1.442695040888963407; // log2(x) = log(x)/log(2).
-}
-
// ES6 draft 09-27-13, section 20.2.2.17.
function MathHypot(x, y) { // Function length is 2.
// We may want to introduce fast paths for two arguments and when
@@ -364,7 +359,7 @@ function SetUpMath() {
"acosh", MathAcosh,
"atanh", MathAtanh,
"log10", MathLog10, // implemented by third_party/fdlibm
- "log2", MathLog2,
+ "log2", MathLog2, // implemented by third_party/fdlibm
"hypot", MathHypot,
"fround", MathFroundJS,
"clz32", MathClz32,
« no previous file with comments | « no previous file | src/third_party/fdlibm/fdlibm.h » ('j') | src/third_party/fdlibm/fdlibm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698