specific-results.js (883B)
1 // Copyright (C) 2016 The V8 Project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-math.log1p 6 description: > 7 Return specific results 8 info: | 9 Math.log1p ( x ) 10 11 If x is NaN, the result is NaN. 12 If x is less than -1, the result is NaN. 13 If x is -1, the result is -∞. 14 If x is +0, the result is +0. 15 If x is -0, the result is -0. 16 If x is +∞, the result is +∞. 17 ---*/ 18 19 assert.sameValue(Math.log1p(NaN), NaN, "NaN"); 20 assert.sameValue(Math.log1p(-1.000001), NaN, "-1.000001"); 21 assert.sameValue(Math.log1p(-2), NaN, "-2"); 22 assert.sameValue(Math.log1p(-Infinity), NaN, "-Infinity"); 23 assert.sameValue(Math.log1p(-1), -Infinity, "-1"); 24 assert.sameValue(Math.log1p(0), 0, "0"); 25 assert.sameValue(Math.log1p(-0), -0, "-0"); 26 assert.sameValue(Math.log1p(Infinity), Infinity, "Infinity"); 27 28 reportCompare(0, 0);