S15.8.2.9_A6.js (542B)
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 x is greater than 0 but less than 1, Math.floor(x) is +0 6 es5id: 15.8.2.9_A6 7 description: > 8 Checking if Math.floor(x) is +0, where x is greater than 0 but 9 less than 1 10 ---*/ 11 12 assert.sameValue(Math.floor(0.000000000000001), 0, "0.000000000000001"); 13 assert.sameValue(Math.floor(0.999999999999999), 0, "0.999999999999999"); 14 assert.sameValue(Math.floor(0.5), 0, "0.5"); 15 16 reportCompare(0, 0);