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

Side by Side Diff: test/mjsunit/es6/math-expm1.js

Issue 195123002: Harmony: move math features to es-staging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: done Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-maths --no-fast-math 5 // Flags: --harmony-maths --no-fast-math
6 6
7 assertTrue(isNaN(Math.expm1(NaN))); 7 assertTrue(isNaN(Math.expm1(NaN)));
8 assertTrue(isNaN(Math.expm1(function() {}))); 8 assertTrue(isNaN(Math.expm1(function() {})));
9 assertTrue(isNaN(Math.expm1({ toString: function() { return NaN; } }))); 9 assertTrue(isNaN(Math.expm1({ toString: function() { return NaN; } })));
10 assertTrue(isNaN(Math.expm1({ valueOf: function() { return "abc"; } }))); 10 assertTrue(isNaN(Math.expm1({ valueOf: function() { return "abc"; } })));
(...skipping 18 matching lines...) Expand all
29 1/6 + x * (1/24 + x * ( 29 1/6 + x * (1/24 + x * (
30 1/120 + x * (1/720 + x * ( 30 1/120 + x * (1/720 + x * (
31 1/5040 + x * (1/40320 + x*( 31 1/5040 + x * (1/40320 + x*(
32 1/362880 + x * (1/3628800)))))))))); 32 1/362880 + x * (1/3628800))))))))));
33 } 33 }
34 34
35 for (var x = 1E-1; x > 1E-300; x *= 0.8) { 35 for (var x = 1E-1; x > 1E-300; x *= 0.8) {
36 var expected = expm1(x); 36 var expected = expm1(x);
37 assertEqualsDelta(expected, Math.expm1(x), expected * 1E-14); 37 assertEqualsDelta(expected, Math.expm1(x), expected * 1E-14);
38 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698