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

Side by Side Diff: test/mjsunit/es6/math-fround.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 5 // Flags: --harmony-maths
6 6
7 // Monkey-patch Float32Array. 7 // Monkey-patch Float32Array.
8 Float32Array = function(x) { this[0] = 0; }; 8 Float32Array = function(x) { this[0] = 0; };
9 9
10 assertTrue(isNaN(Math.fround(NaN))); 10 assertTrue(isNaN(Math.fround(NaN)));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 assertEquals(float.toSingle(), Math.fround(float.toDouble())); 90 assertEquals(float.toSingle(), Math.fround(float.toDouble()));
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 for (var sign = 0; sign < 2; sign++) { 95 for (var sign = 0; sign < 2; sign++) {
96 for (var exp = 1024 - 170; exp < 1024 + 170; exp++) { 96 for (var exp = 1024 - 170; exp < 1024 + 170; exp++) {
97 fuzz_mantissa(sign, exp, 1337 * exp - sign, 127913 * exp - sign); 97 fuzz_mantissa(sign, exp, 1337 * exp - sign, 127913 * exp - sign);
98 } 98 }
99 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698