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

Unified Diff: test/mjsunit/es6/math-log2-log10.js

Issue 739913003: Implement log10 via fdlibm port. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 6 years, 1 month 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 | « src/third_party/fdlibm/fdlibm.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/math-log2-log10.js
diff --git a/test/mjsunit/es6/math-log2-log10.js b/test/mjsunit/es6/math-log2-log10.js
index 4479894d7d89a0ebcd0ce4ecc6e8e5040e4f6421..863506c7055d77127d4694a6c461fc54a7b28d4e 100644
--- a/test/mjsunit/es6/math-log2-log10.js
+++ b/test/mjsunit/es6/math-log2-log10.js
@@ -39,7 +39,10 @@
assertEquals("Infinity", String(fun(Infinity)));
});
-for (var i = -300; i < 300; i += 0.7) {
- assertEqualsDelta(i, Math.log10(Math.pow(10, i)), 1E-13);
+for (var i = -310; i <= 308; i += 0.5) {
+ assertEquals(i, Math.log10(Math.pow(10, i)));
assertEqualsDelta(i, Math.log2(Math.pow(2, i)), 1E-13);
}
+
+// Test denormals.
+assertEquals(-307.77759430519706, Math.log10(1.5 * Math.pow(2, -1023)));
« no previous file with comments | « src/third_party/fdlibm/fdlibm.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698