Merge pull request #247 from anba/issue-35/builtins-Math

Fix strict mode errors in built-ins/Math
This commit is contained in:
Brian Terlson 2015-04-30 09:43:51 -07:00
commit e5d84285c8
74 changed files with 254 additions and 254 deletions

View File

@ -8,7 +8,7 @@ description: Checking if Math.E property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "E") { if(x === "E") {
$ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="E"}\''); $ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="E"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.LN10 property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "LN10") { if(x === "LN10") {
$ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN10"}\''); $ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN10"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.LN2 property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "LN2") { if(x === "LN2") {
$ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN2"}\''); $ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN2"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.LOG10E property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "LOG10E") { if(x === "LOG10E") {
$ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG10E"}\''); $ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG10E"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.LOG2E property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "LOG2E") { if(x === "LOG2E") {
$ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG2E"}\''); $ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG2E"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.PI property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "PI") { if(x === "PI") {
$ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="PI"}\''); $ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="PI"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.SQRT1_2 property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "SQRT1_2") { if(x === "SQRT1_2") {
$ERROR('#1: Value Property SQRT1_2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT1_2"}\''); $ERROR('#1: Value Property SQRT1_2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT1_2"}\'');
} }

View File

@ -8,7 +8,7 @@ description: Checking if Math.SQRT2 property has the attribute DontEnum
---*/ ---*/
// CHECK#1 // CHECK#1
for(x in Math) { for(var x in Math) {
if(x === "SQRT2") { if(x === "SQRT2") {
$ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT2"}\''); $ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT2"}\'');
} }

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = -1.00000000000000000000; x[0] = -1.00000000000000000000;
x[1] = -0.96825396825396826000; x[1] = -0.96825396825396826000;
@ -156,7 +156,7 @@ y[63] = 0.00000000000000000000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.acos(x[i]); val = Math.acos(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = -1.00000000000000000000; x[0] = -1.00000000000000000000;
x[1] = -0.96825396825396826000; x[1] = -0.96825396825396826000;
@ -155,7 +155,7 @@ y[63] = 1.57079632679489660000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.asin(x[i]); val = Math.asin(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = -16.00000000000000000000; x[0] = -16.00000000000000000000;
x[1] = -15.49206349206349200000; x[1] = -15.49206349206349200000;
@ -155,7 +155,7 @@ y[63] = 1.50837751679893930000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.atan(x[i]); val = Math.atan(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -11,7 +11,7 @@ description: >
// CHECK#1 // CHECK#1
vals = new Array(); var vals = new Array();
vals[0] = -Infinity; vals[0] = -Infinity;
vals[1] = -0.000000000000001; vals[1] = -0.000000000000001;
vals[2] = -0; vals[2] = -0;
@ -19,13 +19,13 @@ vals[3] = +0
vals[4] = 0.000000000000001; vals[4] = 0.000000000000001;
vals[5] = +Infinity; vals[5] = +Infinity;
vals[6] = NaN; vals[6] = NaN;
valnum = 7; var valnum = 7;
args = new Array(); var args = new Array();
for (i = 0; i < 2; i++) for (var i = 0; i < 2; i++)
{ {
args[i] = NaN; args[i] = NaN;
for (j = 0; j < valnum; j++) for (var j = 0; j < valnum; j++)
{ {
args[1-i] = vals[j]; args[1-i] = vals[j];
if (!isNaN(Math.atan2(args[0], args[1]))) if (!isNaN(Math.atan2(args[0], args[1])))

View File

@ -14,7 +14,7 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = -0; var y = -0;
x = -0; var x = -0;
if (!isEqual(Math.atan2(y,x), -Math.PI)) if (!isEqual(Math.atan2(y,x), -Math.PI))
$ERROR("#1: !isEqual(Math.atan2(-0,-0), -Math.PI)"); $ERROR("#1: !isEqual(Math.atan2(-0,-0), -Math.PI)");

View File

@ -14,15 +14,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
y = -0; var y = -0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
x = new Array(); var x = new Array();
x[0] = -0.000000000000001; x[0] = -0.000000000000001;
x[2] = -Infinity; x[2] = -Infinity;
x[1] = -1; x[1] = -1;
xnum = 3; var xnum = 3;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isEqual(Math.atan2(y,x[i]), - Math.PI)) if (!isEqual(Math.atan2(y,x[i]), - Math.PI))
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + Math.PI) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + Math.PI) >= " + prec);

View File

@ -16,15 +16,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = +0; var x = +0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = new Array(); var y = new Array();
y[0] = -0.000000000000001; y[0] = -0.000000000000001;
y[2] = -Infinity; y[2] = -Infinity;
y[1] = -1; y[1] = -1;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2)) if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + ((Math.PI)/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + ((Math.PI)/2)) >= " + prec);

View File

@ -16,15 +16,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = -0; var x = -0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = new Array(); var y = new Array();
y[0] = -0.000000000000001; y[0] = -0.000000000000001;
y[2] = -Infinity; y[2] = -Infinity;
y[1] = -1; y[1] = -1;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2)) if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", -0) + ((Math.PI)/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", -0) + ((Math.PI)/2)) >= " + prec);

View File

@ -11,14 +11,14 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
x = +Infinity; var x = +Infinity;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[1] = 1; y[1] = 1;
y[2] = 1.7976931348623157E308; //largest finite number y[2] = 1.7976931348623157E308; //largest finite number
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.atan2(y[i],x) !== +0) if (Math.atan2(y[i],x) !== +0)
$FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== +0"); $FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== +0");

View File

@ -16,14 +16,14 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[1] = 1; y[1] = 1;
y[2] = 1.7976931348623157E308; //largest finite number y[2] = 1.7976931348623157E308; //largest finite number
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x),Math.PI)) if (!isEqual(Math.atan2(y[i],x),Math.PI))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - Math.PI) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - Math.PI) >= " + prec);

View File

@ -11,14 +11,14 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
x = +Infinity; var x = +Infinity;
y = new Array(); var y = new Array();
y[0] = -0.000000000000001; y[0] = -0.000000000000001;
y[1] = -1; y[1] = -1;
y[2] = -1.7976931348623157E308; //largest by abs() finite number y[2] = -1.7976931348623157E308; //largest by abs() finite number
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.atan2(y[i],x) !== -0) if (Math.atan2(y[i],x) !== -0)
$FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== -0"); $FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== -0");

View File

@ -16,14 +16,14 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[0] = -0.000000000000001; y[0] = -0.000000000000001;
y[1] = -1; y[1] = -1;
y[2] = -1.7976931348623157E308; //largest (by module) finite number y[2] = -1.7976931348623157E308; //largest (by module) finite number
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x), -Math.PI)) if (!isEqual(Math.atan2(y[i],x), -Math.PI))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + Math.PI) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + Math.PI) >= " + prec);

View File

@ -16,8 +16,8 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
y = +Infinity; var y = +Infinity;
x = new Array(); var x = new Array();
x[0] = 0.000000000000001; x[0] = 0.000000000000001;
x[1] = 1; x[1] = 1;
x[2] = 1.7976931348623157E308; //largest finite number x[2] = 1.7976931348623157E308; //largest finite number
@ -25,9 +25,9 @@ x[3] = -0.000000000000001;
x[4] = -1; x[4] = -1;
x[5] = -1.7976931348623157E308; //largest (by module) finite number x[5] = -1.7976931348623157E308; //largest (by module) finite number
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isEqual(Math.atan2(y,x[i]), (Math.PI)/2)) if (!isEqual(Math.atan2(y,x[i]), (Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - (Math.PI/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - (Math.PI/2)) >= " + prec);

View File

@ -17,8 +17,8 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = -Infinity; var y = -Infinity;
x = new Array(); var x = new Array();
x[0] = 0.000000000000001; x[0] = 0.000000000000001;
x[1] = 1; x[1] = 1;
x[2] = 1.7976931348623157E308; //largest finite number x[2] = 1.7976931348623157E308; //largest finite number
@ -26,9 +26,9 @@ x[3] = -0.000000000000001;
x[4] = -1; x[4] = -1;
x[5] = -1.7976931348623157E308; //largest (by module) finite number x[5] = -1.7976931348623157E308; //largest (by module) finite number
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isEqual(Math.atan2(y,x[i]), -(Math.PI)/2)) if (!isEqual(Math.atan2(y,x[i]), -(Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + (Math.PI/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + (Math.PI/2)) >= " + prec);

View File

@ -16,15 +16,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = +0; var x = +0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[2] = +Infinity; y[2] = +Infinity;
y[1] = 1; y[1] = 1;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x),(Math.PI)/2)) if (!isEqual(Math.atan2(y[i],x),(Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec);

View File

@ -16,8 +16,8 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = +Infinity; var y = +Infinity;
x = +Infinity; var x = +Infinity;
if (!isEqual(Math.atan2(y,x),(Math.PI)/4)) if (!isEqual(Math.atan2(y,x),(Math.PI)/4))
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (Math.PI/4)) >= " + prec); $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (Math.PI/4)) >= " + prec);

View File

@ -16,8 +16,8 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = +Infinity; var y = +Infinity;
x = -Infinity; var x = -Infinity;
if (!isEqual(Math.atan2(y,x), (3*Math.PI)/4)) if (!isEqual(Math.atan2(y,x), (3*Math.PI)/4))
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (3*Math.PI/4)) >= " + prec); $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (3*Math.PI/4)) >= " + prec);

View File

@ -16,8 +16,8 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = -Infinity; var y = -Infinity;
x = +Infinity; var x = +Infinity;
if (!isEqual(Math.atan2(y,x),- (Math.PI)/4)) if (!isEqual(Math.atan2(y,x),- (Math.PI)/4))
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (Math.PI/4)) >= " + prec); $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (Math.PI/4)) >= " + prec);

View File

@ -16,8 +16,8 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = -Infinity; var y = -Infinity;
x = -Infinity; var x = -Infinity;
if (!isEqual(Math.atan2(y,x), -(3*Math.PI)/4)) if (!isEqual(Math.atan2(y,x), -(3*Math.PI)/4))
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (3*Math.PI/4)) >= " + prec); $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (3*Math.PI/4)) >= " + prec);

View File

@ -17,7 +17,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x1 = new Array(); var x1 = new Array();
x1[0] = -16.00000000000000000000; x1[0] = -16.00000000000000000000;
x1[1] = -15.49206349206349200000; x1[1] = -15.49206349206349200000;
@ -221,7 +221,7 @@ y[63] = 1.10714871779409040000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.atan2(x1[i], x2[i]); val = Math.atan2(x1[i], x2[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,15 +16,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
x = -0; var x = -0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[2] = +Infinity; y[2] = +Infinity;
y[1] = 1; y[1] = 1;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isEqual(Math.atan2(y[i],x), (Math.PI)/2)) if (!isEqual(Math.atan2(y[i],x), (Math.PI)/2))
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec);

View File

@ -9,14 +9,14 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
y = +0; var y = +0;
x = new Array(); var x = new Array();
x[0] = 0.000000000000001; x[0] = 0.000000000000001;
x[2] = +Infinity; x[2] = +Infinity;
x[1] = 1; x[1] = 1;
xnum = 3; var xnum = 3;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.atan2(y,x[i]) !== +0) if (Math.atan2(y,x[i]) !== +0)
$FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== +0"); $FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== +0");

View File

@ -8,7 +8,7 @@ description: Checking if Math.atan2(y,x) is +0, where y is +0 and x is +0
---*/ ---*/
// CHECK#1 // CHECK#1
y = +0; var y = +0;
x = +0; var x = +0;
if (Math.atan2(y,x) !== +0) if (Math.atan2(y,x) !== +0)
$ERROR("#1: Math.atan2(" + y + ", " + x + ") !== +0"); $ERROR("#1: Math.atan2(" + y + ", " + x + ") !== +0");

View File

@ -16,7 +16,7 @@ includes:
// CHECK#1 // CHECK#1
//prec = 0.00000000000001; //prec = 0.00000000000001;
y = +0; var y = +0;
x = -0; var x = -0;
if (!isEqual(Math.atan2(y,x), Math.PI)) if (!isEqual(Math.atan2(y,x), Math.PI))
$ERROR("#1: Math.abs(Math.atan2(" + y + ", -0) - Math.PI) >= " + prec); $ERROR("#1: Math.abs(Math.atan2(" + y + ", -0) - Math.PI) >= " + prec);

View File

@ -16,15 +16,15 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
y = +0; var y = +0;
//prec = 0.00000000000001; //prec = 0.00000000000001;
x = new Array(); var x = new Array();
x[0] = -0.000000000000001; x[0] = -0.000000000000001;
x[2] = -Infinity; x[2] = -Infinity;
x[1] = -1; x[1] = -1;
xnum = 3; var xnum = 3;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isEqual(Math.atan2(y,x[i]), Math.PI)) if (!isEqual(Math.atan2(y,x[i]), Math.PI))
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - Math.PI) >= " + prec); $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - Math.PI) >= " + prec);

View File

@ -9,14 +9,14 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
y = -0; var y = -0;
x = new Array(); var x = new Array();
x[0] = 0.000000000000001; x[0] = 0.000000000000001;
x[2] = +Infinity; x[2] = +Infinity;
x[1] = 1; x[1] = 1;
xnum = 3; var xnum = 3;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.atan2(y,x[i]) !== -0) if (Math.atan2(y,x[i]) !== -0)
$FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== -0"); $FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== -0");

View File

@ -8,7 +8,7 @@ description: Checking if Math.atan2(y,x) is -0, where y is -0 and x is +0
---*/ ---*/
// CHECK#1 // CHECK#1
y = -0; var y = -0;
x = +0; var x = +0;
if (Math.atan2(y,x) !== -0) if (Math.atan2(y,x) !== -0)
$ERROR("#1: Math.atan2(" + y + ", " + x + ") !== -0"); $ERROR("#1: Math.atan2(" + y + ", " + x + ") !== -0");

View File

@ -10,9 +10,9 @@ description: >
---*/ ---*/
// CHECK#1 // CHECK#1
for (i=-1000; i<1000; i++) for (var i=-1000; i<1000; i++)
{ {
x = i/10.0; var x = i/10.0;
if (Math.ceil(x) !== -Math.floor(-x)) if (Math.ceil(x) !== -Math.floor(-x))
{ {
$ERROR("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'"); $ERROR("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'");

View File

@ -12,17 +12,17 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
prec = 0.000000000003; var prec = 0.000000000003;
//prec = 0.000000000000001; //prec = 0.000000000000001;
period = 2*Math.PI; var period = 2*Math.PI;
pernum = 100; var pernum = 100;
a = -pernum * period; var a = -pernum * period;
b = pernum * period; var b = pernum * period;
snum = 9; var snum = 9;
step = period/snum + 0.0; var step = period/snum + 0.0;
x = new Array(); var x = new Array();
for (i = 0; i < snum; i++) for (var i = 0; i < snum; i++)
{ {
x[i] = a + i*step; x[i] = a + i*step;
} }

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = -3.14159265358979310000; x[0] = -3.14159265358979310000;
x[1] = -3.04185955347583150000; x[1] = -3.04185955347583150000;
@ -152,7 +152,7 @@ y[63] = -1.00000000000000000000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.cos(x[i]); val = Math.cos(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = -16.00000000000000000000; x[0] = -16.00000000000000000000;
x[1] = -15.49206349206349200000; x[1] = -15.49206349206349200000;
@ -154,7 +154,7 @@ y[63] = 8886110.520507872100000000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.exp(x[i]); val = Math.exp(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -10,9 +10,9 @@ description: >
---*/ ---*/
// CHECK#1 // CHECK#1
for (i=-1000; i<1000; i++) for (var i=-1000; i<1000; i++)
{ {
x = i/10.0; var x = i/10.0;
if (-Math.ceil(-x) !== Math.floor(x)) if (-Math.ceil(-x) !== Math.floor(x))
{ {
$ERROR("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'"); $ERROR("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'");

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = 0.00000000000000000000; x[0] = 0.00000000000000000000;
x[1] = 0.25396825396825395000; x[1] = 0.25396825396825395000;
@ -153,7 +153,7 @@ y[63] = 2.77258872223978110000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.log(x[i]); val = Math.log(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,7 +16,7 @@ if (!isNaN(Math.max(NaN)))
} }
// CHECK#2 // CHECK#2
vals = new Array(); var vals = new Array();
vals[0] = -Infinity; vals[0] = -Infinity;
vals[1] = -0.000000000000001; vals[1] = -0.000000000000001;
vals[2] = -0; vals[2] = -0;
@ -24,13 +24,13 @@ vals[3] = +0
vals[4] = 0.000000000000001; vals[4] = 0.000000000000001;
vals[5] = +Infinity; vals[5] = +Infinity;
vals[6] = NaN; vals[6] = NaN;
valnum = 7; var valnum = 7;
args = new Array(); var args = new Array();
for (i = 0; i <= 1; i++) for (var i = 0; i <= 1; i++)
{ {
args[i] = NaN; args[i] = NaN;
for (j = 0; j < valnum; j++) for (var j = 0; j < valnum; j++)
{ {
args[1-i] = vals[j]; args[1-i] = vals[j];
if (!isNaN(Math.max(args[0], args[1]))) if (!isNaN(Math.max(args[0], args[1])))
@ -43,7 +43,7 @@ for (i = 0; i <= 1; i++)
// CHECK #3 // CHECK #3
var k = 1; var k = 1;
var l = 2; var l = 2;
for (i = 0; i <= 2; i++) for (var i = 0; i <= 2; i++)
{ {
args[i] = NaN; args[i] = NaN;
if (i === 1) if (i === 1)
@ -53,9 +53,9 @@ for (i = 0; i <= 2; i++)
{ {
l = 1; l = 1;
} }
for (j = 0; j < valnum; j++) for (var j = 0; j < valnum; j++)
{ {
for (jj = 0; jj < valnum; jj++) for (var jj = 0; jj < valnum; jj++)
{ {
args[k] = vals[j]; args[k] = vals[j];
args[l] = vals[jj]; args[l] = vals[jj];

View File

@ -16,7 +16,7 @@ if (!isNaN(Math.min(NaN)))
} }
// CHECK#2 // CHECK#2
vals = new Array(); var vals = new Array();
vals[0] = -Infinity; vals[0] = -Infinity;
vals[1] = -0.000000000000001; vals[1] = -0.000000000000001;
vals[2] = -0; vals[2] = -0;
@ -24,13 +24,13 @@ vals[3] = +0
vals[4] = 0.000000000000001; vals[4] = 0.000000000000001;
vals[5] = +Infinity; vals[5] = +Infinity;
vals[6] = NaN; vals[6] = NaN;
valnum = 7; var valnum = 7;
args = new Array(); var args = new Array();
for (i = 0; i <= 1; i++) for (var i = 0; i <= 1; i++)
{ {
args[i] = NaN; args[i] = NaN;
for (j = 0; j < valnum; j++) for (var j = 0; j < valnum; j++)
{ {
args[1-i] = vals[j]; args[1-i] = vals[j];
if (!isNaN(Math.min(args[0], args[1]))) if (!isNaN(Math.min(args[0], args[1])))
@ -43,7 +43,7 @@ for (i = 0; i <= 1; i++)
// CHECK #3 // CHECK #3
var k = 1; var k = 1;
var l = 2; var l = 2;
for (i = 0; i <= 2; i++) for (var i = 0; i <= 2; i++)
{ {
args[i] = NaN; args[i] = NaN;
if (i === 1) if (i === 1)
@ -53,9 +53,9 @@ for (i = 0; i <= 2; i++)
{ {
l = 1; l = 1;
} }
for (j = 0; j < valnum; j++) for (var j = 0; j < valnum; j++)
{ {
for (jj = 0; jj < valnum; jj++) for (var jj = 0; jj < valnum; jj++)
{ {
args[k] = vals[j]; args[k] = vals[j];
args[l] = vals[jj]; args[l] = vals[jj];

View File

@ -9,8 +9,8 @@ description: Checking if Math.pow(x,y) is NaN, where y is NaN
// CHECK#1 // CHECK#1
y = NaN; var y = NaN;
x = new Array(); var x = new Array();
x[0] = -Infinity; x[0] = -Infinity;
x[1] = -1.7976931348623157E308; //largest (by module) finite number x[1] = -1.7976931348623157E308; //largest (by module) finite number
x[2] = -0.000000000000001; x[2] = -0.000000000000001;
@ -20,9 +20,9 @@ x[5] = 0.000000000000001;
x[6] = 1.7976931348623157E308; //largest finite number x[6] = 1.7976931348623157E308; //largest finite number
x[7] = +Infinity; x[7] = +Infinity;
x[8] = NaN; x[8] = NaN;
xnum = 9; var xnum = 9;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isNaN(Math.pow(x[i],y))) if (!isNaN(Math.pow(x[i],y)))
{ {

View File

@ -11,17 +11,17 @@ description: >
// CHECK#1 // CHECK#1
y = -Infinity; var y = -Infinity;
x = new Array(); var x = new Array();
x[0] = 0.999999999999999; x[0] = 0.999999999999999;
x[1] = 0.5; x[1] = 0.5;
x[2] = +0; x[2] = +0;
x[3] = -0; x[3] = -0;
x[4] = -0.5; x[4] = -0.5;
x[5] = -0.999999999999999; x[5] = -0.999999999999999;
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== +Infinity) if (Math.pow(x[i],y) !== +Infinity)
{ {

View File

@ -11,15 +11,15 @@ description: >
// CHECK#1 // CHECK#1
x = +Infinity; var x = +Infinity;
y = new Array(); var y = new Array();
y[3] = Infinity; y[3] = Infinity;
y[2] = 1.7976931348623157E308; //largest (by module) finite number y[2] = 1.7976931348623157E308; //largest (by module) finite number
y[1] = 1; y[1] = 1;
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
ynum = 4; var ynum = 4;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +Infinity) if (Math.pow(x,y[i]) !== +Infinity)
{ {

View File

@ -11,15 +11,15 @@ description: >
// CHECK#1 // CHECK#1
x = +Infinity; var x = +Infinity;
y = new Array(); var y = new Array();
y[0] = -Infinity; y[0] = -Infinity;
y[1] = -1.7976931348623157E308; //largest (by module) finite number y[1] = -1.7976931348623157E308; //largest (by module) finite number
y[2] = -1; y[2] = -1;
y[3] = -0.000000000000001; y[3] = -0.000000000000001;
ynum = 4; var ynum = 4;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +0) if (Math.pow(x,y[i]) !== +0)
{ {

View File

@ -13,14 +13,14 @@ description: >
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[0] = 1; y[0] = 1;
y[1] = 111; y[1] = 111;
y[2] = 111111; y[2] = 111111;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== -Infinity) if (Math.pow(x,y[i]) !== -Infinity)
{ {

View File

@ -13,16 +13,16 @@ description: >
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[1] = 2; y[1] = 2;
y[2] = Math.PI; y[2] = Math.PI;
y[3] = 1.7976931348623157E308; //largest finite number y[3] = 1.7976931348623157E308; //largest finite number
y[4] = +Infinity; y[4] = +Infinity;
ynum = 5; var ynum = 5;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +Infinity) if (Math.pow(x,y[i]) !== +Infinity)
{ {

View File

@ -11,14 +11,14 @@ description: >
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[2] = -1; y[2] = -1;
y[1] = -111; y[1] = -111;
y[0] = -111111; y[0] = -111111;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== -0) if (Math.pow(x,y[i]) !== -0)
{ {

View File

@ -11,16 +11,16 @@ description: >
// CHECK#1 // CHECK#1
x = -Infinity; var x = -Infinity;
y = new Array(); var y = new Array();
y[4] = -0.000000000000001; y[4] = -0.000000000000001;
y[3] = -2; y[3] = -2;
y[2] = -Math.PI; y[2] = -Math.PI;
y[1] = -1.7976931348623157E308; //largest (by module) finite number y[1] = -1.7976931348623157E308; //largest (by module) finite number
y[0] = -Infinity; y[0] = -Infinity;
ynum = 5; var ynum = 5;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +0) if (Math.pow(x,y[i]) !== +0)
{ {

View File

@ -9,15 +9,15 @@ description: Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0
// CHECK#1 // CHECK#1
x = +0; var x = +0;
y = new Array(); var y = new Array();
y[3] = Infinity; y[3] = Infinity;
y[2] = 1.7976931348623157E308; //largest finite number y[2] = 1.7976931348623157E308; //largest finite number
y[1] = 1; y[1] = 1;
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
ynum = 4; var ynum = 4;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +0) if (Math.pow(x,y[i]) !== +0)
{ {

View File

@ -11,15 +11,15 @@ description: >
// CHECK#1 // CHECK#1
x = +0; var x = +0;
y = new Array(); var y = new Array();
y[0] = -Infinity; y[0] = -Infinity;
y[1] = -1.7976931348623157E308; //largest (by module) finite number y[1] = -1.7976931348623157E308; //largest (by module) finite number
y[2] = -1; y[2] = -1;
y[3] = -0.000000000000001; y[3] = -0.000000000000001;
ynum = 4; var ynum = 4;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +Infinity) if (Math.pow(x,y[i]) !== +Infinity)
{ {

View File

@ -9,14 +9,14 @@ description: Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0
// CHECK#1 // CHECK#1
x = -0; var x = -0;
y = new Array(); var y = new Array();
y[0] = 1; y[0] = 1;
y[1] = 111; y[1] = 111;
y[2] = 111111; y[2] = 111111;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== -0) if (Math.pow(x,y[i]) !== -0)
{ {

View File

@ -11,8 +11,8 @@ description: >
// CHECK#1 // CHECK#1
y = +0; var y = +0;
x = new Array(); var x = new Array();
x[0] = -Infinity; x[0] = -Infinity;
x[1] = -1.7976931348623157E308; //largest (by module) finite number x[1] = -1.7976931348623157E308; //largest (by module) finite number
x[2] = -0.000000000000001; x[2] = -0.000000000000001;
@ -22,9 +22,9 @@ x[5] = 0.000000000000001;
x[6] = 1.7976931348623157E308; //largest finite number x[6] = 1.7976931348623157E308; //largest finite number
x[7] = +Infinity; x[7] = +Infinity;
x[8] = NaN; x[8] = NaN;
xnum = 9; var xnum = 9;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== 1) if (Math.pow(x[i],y) !== 1)
{ {

View File

@ -11,16 +11,16 @@ description: >
// CHECK#1 // CHECK#1
x = -0; var x = -0;
y = new Array(); var y = new Array();
y[0] = 0.000000000000001; y[0] = 0.000000000000001;
y[1] = 2; y[1] = 2;
y[2] = Math.PI; y[2] = Math.PI;
y[3] = 1.7976931348623157E308; //largest finite number y[3] = 1.7976931348623157E308; //largest finite number
y[4] = +Infinity; y[4] = +Infinity;
ynum = 5; var ynum = 5;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +0) if (Math.pow(x,y[i]) !== +0)
{ {

View File

@ -11,14 +11,14 @@ description: >
// CHECK#1 // CHECK#1
x = -0; var x = -0;
y = new Array(); var y = new Array();
y[2] = -1; y[2] = -1;
y[1] = -111; y[1] = -111;
y[0] = -111111; y[0] = -111111;
ynum = 3; var ynum = 3;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== -Infinity) if (Math.pow(x,y[i]) !== -Infinity)
{ {

View File

@ -11,16 +11,16 @@ description: >
// CHECK#1 // CHECK#1
x = -0; var x = -0;
y = new Array(); var y = new Array();
y[4] = -0.000000000000001; y[4] = -0.000000000000001;
y[3] = -2; y[3] = -2;
y[2] = -Math.PI; y[2] = -Math.PI;
y[1] = -1.7976931348623157E308; //largest (by module) finite number y[1] = -1.7976931348623157E308; //largest (by module) finite number
y[0] = -Infinity; y[0] = -Infinity;
ynum = 5; var ynum = 5;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (Math.pow(x,y[i]) !== +Infinity) if (Math.pow(x,y[i]) !== +Infinity)
{ {

View File

@ -13,13 +13,13 @@ description: >
// CHECK#1 // CHECK#1
y = NaN; var y = new Array();
x = new Array(); var x = new Array();
x[0] = -1.7976931348623157E308; //largest (by module) finite number x[0] = -1.7976931348623157E308; //largest (by module) finite number
x[1] = -Math.PI; x[1] = -Math.PI;
x[2] = -1; x[2] = -1;
x[3] = -0.000000000000001; x[3] = -0.000000000000001;
xnum = 4; var xnum = 4;
y[0] = -Math.PI; y[0] = -Math.PI;
y[1] = -Math.E; y[1] = -Math.E;
@ -29,9 +29,9 @@ y[4] = 0.000000000000001;
y[5] = 1.000000000000001; y[5] = 1.000000000000001;
y[6] = Math.E; y[6] = Math.E;
y[7] = Math.PI; y[7] = Math.PI;
ynum = 8; var ynum = 8;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
for (j = 0; j < ynum; j++) for (var j = 0; j < ynum; j++)
if (!isNaN(Math.pow(x[i],y[j]))) if (!isNaN(Math.pow(x[i],y[j])))
$ERROR("#1: isNaN(Math.pow(" + x[i] + ", " + y[j] + ")) === false"); $ERROR("#1: isNaN(Math.pow(" + x[i] + ", " + y[j] + ")) === false");

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x1 = new Array(); var x1 = new Array();
x1[0] = 0.00000000000000000000; x1[0] = 0.00000000000000000000;
x1[1] = 0.25396825396825395000; x1[1] = 0.25396825396825395000;
@ -221,7 +221,7 @@ y[63] = 18446744073709552000.00000000000000000000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.pow(x1[i], x2[i]); val = Math.pow(x1[i], x2[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -11,8 +11,8 @@ description: >
// CHECK#1 // CHECK#1
y = +0; var y = +0;
x = new Array(); var x = new Array();
x[0] = -Infinity; x[0] = -Infinity;
x[1] = -1.7976931348623157E308; //largest (by module) finite number x[1] = -1.7976931348623157E308; //largest (by module) finite number
x[2] = -0.000000000000001; x[2] = -0.000000000000001;
@ -22,9 +22,9 @@ x[5] = 0.000000000000001;
x[6] = 1.7976931348623157E308; //largest finite number x[6] = 1.7976931348623157E308; //largest finite number
x[7] = +Infinity; x[7] = +Infinity;
x[8] = NaN; x[8] = NaN;
xnum = 9; var xnum = 9;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== 1) if (Math.pow(x[i],y) !== 1)
{ {

View File

@ -9,8 +9,8 @@ description: Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero
// CHECK#1 // CHECK#1
x = NaN; var x = NaN;
y = new Array(); var y = new Array();
y[0] = -Infinity; y[0] = -Infinity;
y[1] = -1.7976931348623157E308; //largest (by module) finite number y[1] = -1.7976931348623157E308; //largest (by module) finite number
y[2] = -0.000000000000001; y[2] = -0.000000000000001;
@ -18,9 +18,9 @@ y[3] = 0.000000000000001;
y[4] = 1.7976931348623157E308; //largest finite number y[4] = 1.7976931348623157E308; //largest finite number
y[5] = +Infinity; y[5] = +Infinity;
y[6] = NaN; y[6] = NaN;
ynum = 7; var ynum = 7;
for (i = 0; i < ynum; i++) for (var i = 0; i < ynum; i++)
{ {
if (!isNaN(Math.pow(x,y[i]))) if (!isNaN(Math.pow(x,y[i])))
{ {

View File

@ -11,17 +11,17 @@ description: >
// CHECK#1 // CHECK#1
y = +Infinity; var y = +Infinity;
x = new Array(); var x = new Array();
x[0] = -Infinity; x[0] = -Infinity;
x[1] = -1.7976931348623157E308; //largest (by module) finite number x[1] = -1.7976931348623157E308; //largest (by module) finite number
x[2] = -1.000000000000001; x[2] = -1.000000000000001;
x[3] = 1.000000000000001; x[3] = 1.000000000000001;
x[4] = 1.7976931348623157E308; //largest finite number x[4] = 1.7976931348623157E308; //largest finite number
x[5] = +Infinity; x[5] = +Infinity;
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== +Infinity) if (Math.pow(x[i],y) !== +Infinity)
{ {

View File

@ -11,17 +11,17 @@ description: >
// CHECK#1 // CHECK#1
y = -Infinity; var y = -Infinity;
x = new Array(); var x = new Array();
x[0] = -Infinity; x[0] = -Infinity;
x[1] = -1.7976931348623157E308; //largest (by module) finite number x[1] = -1.7976931348623157E308; //largest (by module) finite number
x[2] = -1.000000000000001; x[2] = -1.000000000000001;
x[3] = 1.000000000000001; x[3] = 1.000000000000001;
x[4] = 1.7976931348623157E308; //largest finite number x[4] = 1.7976931348623157E308; //largest finite number
x[5] = +Infinity; x[5] = +Infinity;
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== +0) if (Math.pow(x[i],y) !== +0)
{ {

View File

@ -12,13 +12,13 @@ includes: [$FAIL.js]
// CHECK#1 // CHECK#1
y = +Infinity; var y = +Infinity;
x = new Array(); var x = new Array();
x[0] = -1; x[0] = -1;
x[1] = 1 x[1] = 1
xnum = 2; var xnum = 2;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isNaN(Math.pow(x[i],y))) if (!isNaN(Math.pow(x[i],y)))
{ {

View File

@ -12,13 +12,13 @@ includes: [$FAIL.js]
// CHECK#1 // CHECK#1
y = -Infinity; var y = -Infinity;
x = new Array(); var x = new Array();
x[0] = -1; x[0] = -1;
x[1] = 1 x[1] = 1
xnum = 2; var xnum = 2;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (!isNaN(Math.pow(x[i],y))) if (!isNaN(Math.pow(x[i],y)))
{ {

View File

@ -11,17 +11,17 @@ description: >
// CHECK#1 // CHECK#1
y = +Infinity; var y = +Infinity;
x = new Array(); var x = new Array();
x[0] = 0.999999999999999; x[0] = 0.999999999999999;
x[1] = 0.5; x[1] = 0.5;
x[2] = +0; x[2] = +0;
x[3] = -0; x[3] = -0;
x[4] = -0.5; x[4] = -0.5;
x[5] = -0.999999999999999; x[5] = -0.999999999999999;
xnum = 6; var xnum = 6;
for (i = 0; i < xnum; i++) for (var i = 0; i < xnum; i++)
{ {
if (Math.pow(x[i],y) !== +0) if (Math.pow(x[i],y) !== +0)
{ {

View File

@ -12,9 +12,9 @@ description: >
---*/ ---*/
// CHECK#1 // CHECK#1
for (i = 0; i < 100; i++) for (var i = 0; i < 100; i++)
{ {
val = Math.random(); var val = Math.random();
if (val < 0 || val >= 1) if (val < 0 || val >= 1)
{ {
$ERROR("#1: Math.random() = " + val); $ERROR("#1: Math.random() = " + val);

View File

@ -13,9 +13,9 @@ description: >
---*/ ---*/
// CHECK#1 // CHECK#1
for (i = 0; i <= 1000; i++) for (var i = 0; i <= 1000; i++)
{ {
x = i/10.0; var x = i/10.0;
if (Math.round(x) !== Math.floor(x + 0.5)) if (Math.round(x) !== Math.floor(x + 0.5))
{ {
$ERROR("#1: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") $ERROR("#1: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'")

View File

@ -12,17 +12,17 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
prec = 0.000000000003; var prec = 0.000000000003;
//prec = 0.000000000000001; //prec = 0.000000000000001;
period = 2*Math.PI; var period = 2*Math.PI;
pernum = 100; var pernum = 100;
a = -pernum * period; var a = -pernum * period;
b = pernum * period; var b = pernum * period;
snum = 9; var snum = 9;
step = period/snum + 0.0; var step = period/snum + 0.0;
x = new Array(); var x = new Array();
for (i = 0; i < snum; i++) for (var i = 0; i < snum; i++)
{ {
x[i] = a + i*step; x[i] = a + i*step;
} }
@ -35,7 +35,7 @@ for (i = 0; i < snum; i++)
{ {
curval = Math.sin(x[i]); curval = Math.sin(x[i]);
curx = x[i] + period; curx = x[i] + period;
j = 0; var j = 0;
while (curx <= b) while (curx <= b)
{ {
curx += period; curx += period;

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = 0.00000000000000000000; x[0] = 0.00000000000000000000;
x[1] = 0.09973310011396169200; x[1] = 0.09973310011396169200;
@ -155,7 +155,7 @@ y[62] = -0.09956784659581728600;
y[63] = -0.00008530717948287973; y[63] = -0.00008530717948287973;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.sin(x[i]); val = Math.sin(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
x[0] = 0.00000000000000000000; x[0] = 0.00000000000000000000;
x[1] = 0.25396825396825395000; x[1] = 0.25396825396825395000;
@ -153,7 +153,7 @@ y[63] = 4.00000000000000000000;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.sqrt(x[i]); val = Math.sqrt(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))

View File

@ -12,17 +12,17 @@ includes: [$FAIL.js]
---*/ ---*/
// CHECK#1 // CHECK#1
prec = 0.00000000003; var prec = 0.00000000003;
//prec = 0.000000000000001; //prec = 0.000000000000001;
period = Math.PI; var period = Math.PI;
pernum = 100; var pernum = 100;
a = -pernum * period + period/2; var a = -pernum * period + period/2;
b = pernum * period - period/2; var b = pernum * period - period/2;
snum = 9; var snum = 9;
step = period/(snum + 2); var step = period/(snum + 2);
x = new Array(); var x = new Array();
for (i = 0; i <= snum; i++) //// We exlude special points for (var i = 0; i <= snum; i++) //// We exlude special points
{ //// in this cycle. { //// in this cycle.
x[i] = a + (i+1)*step; //// x[i] = a + (i+1)*step; ////
} //// } ////
@ -35,7 +35,7 @@ for (i = 0; i < snum; i++)
{ {
curval = Math.tan(x[i]); curval = Math.tan(x[i]);
curx = x[i] + period; curx = x[i] + period;
j = 0; var j = 0;
while (curx <= b) while (curx <= b)
{ {
curx += period; curx += period;

View File

@ -16,7 +16,7 @@ includes:
---*/ ---*/
// CHECK#1 // CHECK#1
vnum = 64; var vnum = 64;
var x = new Array(); var x = new Array();
// Result is implementation dependent and varies on platform as you approach limits. // Result is implementation dependent and varies on platform as you approach limits.
// e.g. Output approaches Infinity as input approaches PI / 2 (1.5707963267948966) // e.g. Output approaches Infinity as input approaches PI / 2 (1.5707963267948966)
@ -157,7 +157,7 @@ y[63] = 10381.32741756979;
var val; var val;
for (i = 0; i < vnum; i++) for (var i = 0; i < vnum; i++)
{ {
val = Math.tan(x[i]); val = Math.tan(x[i]);
if (!isEqual(val, y[i])) if (!isEqual(val, y[i]))