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

Unified Diff: src/third_party/fdlibm/fdlibm.cc

Issue 786823003: Implement Math.log2 via ported extract from fdlibm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/third_party/fdlibm/fdlibm.cc
diff --git a/src/third_party/fdlibm/fdlibm.cc b/src/third_party/fdlibm/fdlibm.cc
index 23c13c0f058ba3091e9217de466650edb9153b00..0d014921bd646d88417c9708bd3f95d21e55a68b 100644
--- a/src/third_party/fdlibm/fdlibm.cc
+++ b/src/third_party/fdlibm/fdlibm.cc
@@ -82,7 +82,18 @@ const double MathConstants::constants[] = {
710.4758600739439, // 52 overflow threshold sinh, cosh
4.34294481903251816668e-01, // ivln10 53 coefficients for log10
3.01029995663611771306e-01, // log10_2hi 54
- 3.69423907715893078616e-13 // log10_2lo 55
+ 3.69423907715893078616e-13, // log10_2lo 55
+ 5.99999999999994648725e-01, // L1 56 coefficients for log2
+ 4.28571428578550184252e-01, // 57
+ 3.33333329818377432918e-01, // 58
+ 2.72728123808534006489e-01, // 59
+ 2.30660745775561754067e-01, // 60
+ 2.06975017800338417784e-01, // L6 61
+ 9.61796693925975554329e-01, // cp 62 2/(3*ln(2))
+ 9.61796700954437255859e-01, // cp_h 63
+ -7.02846165095275826516e-09, // cp_l 64
+ 5.84962487220764160156e-01, // dp_h 65
+ 1.35003920212974897128e-08 // dp_l 66
};

Powered by Google App Engine
This is Rietveld 408576698