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

Side by Side Diff: test/mjsunit/asm/math-fround.js

Issue 606583002: Slightly adapt Math.fround test. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: --turbo-asm
6
7 function Module(stdlib) { 5 function Module(stdlib) {
8 "use asm"; 6 "use asm";
9 7
10 var fround = stdlib.Math.fround; 8 var fround = stdlib.Math.fround;
11 9
12 // f: double -> float 10 // f: double -> float
13 function f(a) { 11 function f(a) {
14 a = +a; 12 a = +a;
15 return fround(a); 13 return fround(a);
16 } 14 }
(...skipping 14 matching lines...) Expand all
31 assertEquals("Infinity", String(f(1E200))); 29 assertEquals("Infinity", String(f(1E200)));
32 assertEquals("-Infinity", String(f(-1E200))); 30 assertEquals("-Infinity", String(f(-1E200)));
33 assertEquals("Infinity", String(1/f(1E-300))); 31 assertEquals("Infinity", String(1/f(1E-300)));
34 assertEquals("-Infinity", String(1/f(-1E-300))); 32 assertEquals("-Infinity", String(1/f(-1E-300)));
35 33
36 assertEquals(0, f(0)); 34 assertEquals(0, f(0));
37 assertEquals(1, f(1)); 35 assertEquals(1, f(1));
38 assertEquals(1.5, f(1.5)); 36 assertEquals(1.5, f(1.5));
39 assertEquals(1.3370000123977661, f(1.337)); 37 assertEquals(1.3370000123977661, f(1.337));
40 assertEquals(-4.300000190734863, f(-4.3)); 38 assertEquals(-4.300000190734863, f(-4.3));
OLDNEW
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698