S15.8.2.5_A14.js (630B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: If y>0 and y is finite and x is equal to +Infinity, Math.atan2(y,x) is +0 6 es5id: 15.8.2.5_A14 7 description: > 8 Checking if Math.atan2(y,x) equals to +0, where y>0 and y is 9 finite and x is equal to +Infinity 10 ---*/ 11 12 // CHECK#1 13 var x = +Infinity; 14 var y = new Array(); 15 y[0] = 0.000000000000001; 16 y[1] = 1; 17 y[2] = 1.7976931348623157E308; //largest finite number 18 var ynum = 3; 19 20 for (var i = 0; i < ynum; i++) 21 { 22 assert.sameValue(Math.atan2(y[i], x), 0, y[i]); 23 } 24 25 reportCompare(0, 0);