S15.8.2.5_A8.js (554B)
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 is equal to -0 and x>0, Math.atan2(y,x) is -0 6 es5id: 15.8.2.5_A8 7 description: Checking if Math.atan2(y,x) is -0, where y is equal to -0 and x>0 8 ---*/ 9 10 // CHECK#1 11 var y = -0; 12 var x = new Array(); 13 x[0] = 0.000000000000001; 14 x[2] = +Infinity; 15 x[1] = 1; 16 var xnum = 3; 17 18 for (var i = 0; i < xnum; i++) 19 { 20 assert.sameValue( 21 Math.atan2(y, x[i]), 22 -0, 23 "(-0, " + x[i] + ")" 24 ); 25 } 26 27 reportCompare(0, 0);