| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |