mirror of https://github.com/tc39/test262.git
Merge pull request #247 from anba/issue-35/builtins-Math
Fix strict mode errors in built-ins/Math
This commit is contained in:
commit
e5d84285c8
|
@ -8,7 +8,7 @@ description: Checking if Math.E property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "E") {
|
||||
$ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="E"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.LN10 property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "LN10") {
|
||||
$ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN10"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.LN2 property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "LN2") {
|
||||
$ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN2"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.LOG10E property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "LOG10E") {
|
||||
$ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG10E"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.LOG2E property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "LOG2E") {
|
||||
$ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG2E"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.PI property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "PI") {
|
||||
$ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="PI"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.SQRT1_2 property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
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"}\'');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.SQRT2 property has the attribute DontEnum
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
for(x in Math) {
|
||||
for(var x in Math) {
|
||||
if(x === "SQRT2") {
|
||||
$ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT2"}\'');
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = -1.00000000000000000000;
|
||||
x[1] = -0.96825396825396826000;
|
||||
|
@ -156,7 +156,7 @@ y[63] = 0.00000000000000000000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.acos(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = -1.00000000000000000000;
|
||||
x[1] = -0.96825396825396826000;
|
||||
|
@ -155,7 +155,7 @@ y[63] = 1.57079632679489660000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.asin(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = -16.00000000000000000000;
|
||||
x[1] = -15.49206349206349200000;
|
||||
|
@ -155,7 +155,7 @@ y[63] = 1.50837751679893930000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.atan(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -11,7 +11,7 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
vals = new Array();
|
||||
var vals = new Array();
|
||||
vals[0] = -Infinity;
|
||||
vals[1] = -0.000000000000001;
|
||||
vals[2] = -0;
|
||||
|
@ -19,13 +19,13 @@ vals[3] = +0
|
|||
vals[4] = 0.000000000000001;
|
||||
vals[5] = +Infinity;
|
||||
vals[6] = NaN;
|
||||
valnum = 7;
|
||||
var valnum = 7;
|
||||
|
||||
args = new Array();
|
||||
for (i = 0; i < 2; i++)
|
||||
var args = new Array();
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
args[i] = NaN;
|
||||
for (j = 0; j < valnum; j++)
|
||||
for (var j = 0; j < valnum; j++)
|
||||
{
|
||||
args[1-i] = vals[j];
|
||||
if (!isNaN(Math.atan2(args[0], args[1])))
|
||||
|
|
|
@ -14,7 +14,7 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = -0;
|
||||
x = -0;
|
||||
var y = -0;
|
||||
var x = -0;
|
||||
if (!isEqual(Math.atan2(y,x), -Math.PI))
|
||||
$ERROR("#1: !isEqual(Math.atan2(-0,-0), -Math.PI)");
|
||||
|
|
|
@ -14,15 +14,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = -0;
|
||||
var y = -0;
|
||||
//prec = 0.00000000000001;
|
||||
x = new Array();
|
||||
var x = new Array();
|
||||
x[0] = -0.000000000000001;
|
||||
x[2] = -Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + Math.PI) >= " + prec);
|
||||
|
|
|
@ -16,15 +16,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = +0;
|
||||
var x = +0;
|
||||
//prec = 0.00000000000001;
|
||||
y = new Array();
|
||||
var y = new Array();
|
||||
y[0] = -0.000000000000001;
|
||||
y[2] = -Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + ((Math.PI)/2)) >= " + prec);
|
||||
|
|
|
@ -16,15 +16,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = -0;
|
||||
var x = -0;
|
||||
//prec = 0.00000000000001;
|
||||
y = new Array();
|
||||
var y = new Array();
|
||||
y[0] = -0.000000000000001;
|
||||
y[2] = -Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", -0) + ((Math.PI)/2)) >= " + prec);
|
||||
|
|
|
@ -11,14 +11,14 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = +Infinity;
|
||||
y = new Array();
|
||||
var x = +Infinity;
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[1] = 1;
|
||||
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)
|
||||
$FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== +0");
|
||||
|
|
|
@ -16,14 +16,14 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[1] = 1;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - Math.PI) >= " + prec);
|
||||
|
|
|
@ -11,14 +11,14 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = +Infinity;
|
||||
y = new Array();
|
||||
var x = +Infinity;
|
||||
var y = new Array();
|
||||
y[0] = -0.000000000000001;
|
||||
y[1] = -1;
|
||||
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)
|
||||
$FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== -0");
|
||||
|
|
|
@ -16,14 +16,14 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[0] = -0.000000000000001;
|
||||
y[1] = -1;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + Math.PI) >= " + prec);
|
||||
|
|
|
@ -16,8 +16,8 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = +Infinity;
|
||||
x = new Array();
|
||||
var y = +Infinity;
|
||||
var x = new Array();
|
||||
x[0] = 0.000000000000001;
|
||||
x[1] = 1;
|
||||
x[2] = 1.7976931348623157E308; //largest finite number
|
||||
|
@ -25,9 +25,9 @@ x[3] = -0.000000000000001;
|
|||
x[4] = -1;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - (Math.PI/2)) >= " + prec);
|
||||
|
|
|
@ -17,8 +17,8 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = -Infinity;
|
||||
x = new Array();
|
||||
var y = -Infinity;
|
||||
var x = new Array();
|
||||
x[0] = 0.000000000000001;
|
||||
x[1] = 1;
|
||||
x[2] = 1.7976931348623157E308; //largest finite number
|
||||
|
@ -26,9 +26,9 @@ x[3] = -0.000000000000001;
|
|||
x[4] = -1;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + (Math.PI/2)) >= " + prec);
|
||||
|
|
|
@ -16,15 +16,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = +0;
|
||||
var x = +0;
|
||||
//prec = 0.00000000000001;
|
||||
y = new Array();
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[2] = +Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec);
|
||||
|
|
|
@ -16,8 +16,8 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = +Infinity;
|
||||
x = +Infinity;
|
||||
var y = +Infinity;
|
||||
var x = +Infinity;
|
||||
|
||||
if (!isEqual(Math.atan2(y,x),(Math.PI)/4))
|
||||
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (Math.PI/4)) >= " + prec);
|
||||
|
|
|
@ -16,8 +16,8 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = +Infinity;
|
||||
x = -Infinity;
|
||||
var y = +Infinity;
|
||||
var x = -Infinity;
|
||||
|
||||
if (!isEqual(Math.atan2(y,x), (3*Math.PI)/4))
|
||||
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (3*Math.PI/4)) >= " + prec);
|
||||
|
|
|
@ -16,8 +16,8 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = -Infinity;
|
||||
x = +Infinity;
|
||||
var y = -Infinity;
|
||||
var x = +Infinity;
|
||||
|
||||
if (!isEqual(Math.atan2(y,x),- (Math.PI)/4))
|
||||
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (Math.PI/4)) >= " + prec);
|
||||
|
|
|
@ -16,8 +16,8 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = -Infinity;
|
||||
x = -Infinity;
|
||||
var y = -Infinity;
|
||||
var x = -Infinity;
|
||||
|
||||
if (!isEqual(Math.atan2(y,x), -(3*Math.PI)/4))
|
||||
$ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (3*Math.PI/4)) >= " + prec);
|
||||
|
|
|
@ -17,7 +17,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x1 = new Array();
|
||||
x1[0] = -16.00000000000000000000;
|
||||
x1[1] = -15.49206349206349200000;
|
||||
|
@ -221,7 +221,7 @@ y[63] = 1.10714871779409040000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.atan2(x1[i], x2[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,15 +16,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
x = -0;
|
||||
var x = -0;
|
||||
//prec = 0.00000000000001;
|
||||
y = new Array();
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[2] = +Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec);
|
||||
|
|
|
@ -9,14 +9,14 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = +0;
|
||||
x = new Array();
|
||||
var y = +0;
|
||||
var x = new Array();
|
||||
x[0] = 0.000000000000001;
|
||||
x[2] = +Infinity;
|
||||
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)
|
||||
$FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== +0");
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.atan2(y,x) is +0, where y is +0 and x is +0
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = +0;
|
||||
x = +0;
|
||||
var y = +0;
|
||||
var x = +0;
|
||||
if (Math.atan2(y,x) !== +0)
|
||||
$ERROR("#1: Math.atan2(" + y + ", " + x + ") !== +0");
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
|
||||
// CHECK#1
|
||||
//prec = 0.00000000000001;
|
||||
y = +0;
|
||||
x = -0;
|
||||
var y = +0;
|
||||
var x = -0;
|
||||
if (!isEqual(Math.atan2(y,x), Math.PI))
|
||||
$ERROR("#1: Math.abs(Math.atan2(" + y + ", -0) - Math.PI) >= " + prec);
|
||||
|
|
|
@ -16,15 +16,15 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = +0;
|
||||
var y = +0;
|
||||
//prec = 0.00000000000001;
|
||||
x = new Array();
|
||||
var x = new Array();
|
||||
x[0] = -0.000000000000001;
|
||||
x[2] = -Infinity;
|
||||
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))
|
||||
$FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - Math.PI) >= " + prec);
|
||||
|
|
|
@ -9,14 +9,14 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = -0;
|
||||
x = new Array();
|
||||
var y = -0;
|
||||
var x = new Array();
|
||||
x[0] = 0.000000000000001;
|
||||
x[2] = +Infinity;
|
||||
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)
|
||||
$FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== -0");
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Checking if Math.atan2(y,x) is -0, where y is -0 and x is +0
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
y = -0;
|
||||
x = +0;
|
||||
var y = -0;
|
||||
var x = +0;
|
||||
if (Math.atan2(y,x) !== -0)
|
||||
$ERROR("#1: Math.atan2(" + y + ", " + x + ") !== -0");
|
||||
|
|
|
@ -10,9 +10,9 @@ description: >
|
|||
---*/
|
||||
|
||||
// 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))
|
||||
{
|
||||
$ERROR("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'");
|
||||
|
|
|
@ -12,17 +12,17 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
prec = 0.000000000003;
|
||||
var prec = 0.000000000003;
|
||||
//prec = 0.000000000000001;
|
||||
period = 2*Math.PI;
|
||||
pernum = 100;
|
||||
var period = 2*Math.PI;
|
||||
var pernum = 100;
|
||||
|
||||
a = -pernum * period;
|
||||
b = pernum * period;
|
||||
snum = 9;
|
||||
step = period/snum + 0.0;
|
||||
x = new Array();
|
||||
for (i = 0; i < snum; i++)
|
||||
var a = -pernum * period;
|
||||
var b = pernum * period;
|
||||
var snum = 9;
|
||||
var step = period/snum + 0.0;
|
||||
var x = new Array();
|
||||
for (var i = 0; i < snum; i++)
|
||||
{
|
||||
x[i] = a + i*step;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = -3.14159265358979310000;
|
||||
x[1] = -3.04185955347583150000;
|
||||
|
@ -152,7 +152,7 @@ y[63] = -1.00000000000000000000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.cos(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = -16.00000000000000000000;
|
||||
x[1] = -15.49206349206349200000;
|
||||
|
@ -154,7 +154,7 @@ y[63] = 8886110.520507872100000000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.exp(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -10,9 +10,9 @@ description: >
|
|||
---*/
|
||||
|
||||
// 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))
|
||||
{
|
||||
$ERROR("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'");
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = 0.00000000000000000000;
|
||||
x[1] = 0.25396825396825395000;
|
||||
|
@ -153,7 +153,7 @@ y[63] = 2.77258872223978110000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.log(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,7 +16,7 @@ if (!isNaN(Math.max(NaN)))
|
|||
}
|
||||
|
||||
// CHECK#2
|
||||
vals = new Array();
|
||||
var vals = new Array();
|
||||
vals[0] = -Infinity;
|
||||
vals[1] = -0.000000000000001;
|
||||
vals[2] = -0;
|
||||
|
@ -24,13 +24,13 @@ vals[3] = +0
|
|||
vals[4] = 0.000000000000001;
|
||||
vals[5] = +Infinity;
|
||||
vals[6] = NaN;
|
||||
valnum = 7;
|
||||
var valnum = 7;
|
||||
|
||||
args = new Array();
|
||||
for (i = 0; i <= 1; i++)
|
||||
var args = new Array();
|
||||
for (var i = 0; i <= 1; i++)
|
||||
{
|
||||
args[i] = NaN;
|
||||
for (j = 0; j < valnum; j++)
|
||||
for (var j = 0; j < valnum; j++)
|
||||
{
|
||||
args[1-i] = vals[j];
|
||||
if (!isNaN(Math.max(args[0], args[1])))
|
||||
|
@ -43,7 +43,7 @@ for (i = 0; i <= 1; i++)
|
|||
// CHECK #3
|
||||
var k = 1;
|
||||
var l = 2;
|
||||
for (i = 0; i <= 2; i++)
|
||||
for (var i = 0; i <= 2; i++)
|
||||
{
|
||||
args[i] = NaN;
|
||||
if (i === 1)
|
||||
|
@ -53,9 +53,9 @@ for (i = 0; i <= 2; i++)
|
|||
{
|
||||
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[l] = vals[jj];
|
||||
|
|
|
@ -16,7 +16,7 @@ if (!isNaN(Math.min(NaN)))
|
|||
}
|
||||
|
||||
// CHECK#2
|
||||
vals = new Array();
|
||||
var vals = new Array();
|
||||
vals[0] = -Infinity;
|
||||
vals[1] = -0.000000000000001;
|
||||
vals[2] = -0;
|
||||
|
@ -24,13 +24,13 @@ vals[3] = +0
|
|||
vals[4] = 0.000000000000001;
|
||||
vals[5] = +Infinity;
|
||||
vals[6] = NaN;
|
||||
valnum = 7;
|
||||
var valnum = 7;
|
||||
|
||||
args = new Array();
|
||||
for (i = 0; i <= 1; i++)
|
||||
var args = new Array();
|
||||
for (var i = 0; i <= 1; i++)
|
||||
{
|
||||
args[i] = NaN;
|
||||
for (j = 0; j < valnum; j++)
|
||||
for (var j = 0; j < valnum; j++)
|
||||
{
|
||||
args[1-i] = vals[j];
|
||||
if (!isNaN(Math.min(args[0], args[1])))
|
||||
|
@ -43,7 +43,7 @@ for (i = 0; i <= 1; i++)
|
|||
// CHECK #3
|
||||
var k = 1;
|
||||
var l = 2;
|
||||
for (i = 0; i <= 2; i++)
|
||||
for (var i = 0; i <= 2; i++)
|
||||
{
|
||||
args[i] = NaN;
|
||||
if (i === 1)
|
||||
|
@ -53,9 +53,9 @@ for (i = 0; i <= 2; i++)
|
|||
{
|
||||
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[l] = vals[jj];
|
||||
|
|
|
@ -9,8 +9,8 @@ description: Checking if Math.pow(x,y) is NaN, where y is NaN
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = NaN;
|
||||
x = new Array();
|
||||
var y = NaN;
|
||||
var x = new Array();
|
||||
x[0] = -Infinity;
|
||||
x[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[2] = -0.000000000000001;
|
||||
|
@ -20,9 +20,9 @@ x[5] = 0.000000000000001;
|
|||
x[6] = 1.7976931348623157E308; //largest finite number
|
||||
x[7] = +Infinity;
|
||||
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)))
|
||||
{
|
||||
|
|
|
@ -11,17 +11,17 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = -Infinity;
|
||||
x = new Array();
|
||||
var y = -Infinity;
|
||||
var x = new Array();
|
||||
x[0] = 0.999999999999999;
|
||||
x[1] = 0.5;
|
||||
x[2] = +0;
|
||||
x[3] = -0;
|
||||
x[4] = -0.5;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,15 +11,15 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = +Infinity;
|
||||
y = new Array();
|
||||
var x = +Infinity;
|
||||
var y = new Array();
|
||||
y[3] = Infinity;
|
||||
y[2] = 1.7976931348623157E308; //largest (by module) finite number
|
||||
y[1] = 1;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,15 +11,15 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = +Infinity;
|
||||
y = new Array();
|
||||
var x = +Infinity;
|
||||
var y = new Array();
|
||||
y[0] = -Infinity;
|
||||
y[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
y[2] = -1;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -13,14 +13,14 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[0] = 1;
|
||||
y[1] = 111;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -13,16 +13,16 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[1] = 2;
|
||||
y[2] = Math.PI;
|
||||
y[3] = 1.7976931348623157E308; //largest finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,14 +11,14 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[2] = -1;
|
||||
y[1] = -111;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,16 +11,16 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -Infinity;
|
||||
y = new Array();
|
||||
var x = -Infinity;
|
||||
var y = new Array();
|
||||
y[4] = -0.000000000000001;
|
||||
y[3] = -2;
|
||||
y[2] = -Math.PI;
|
||||
y[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -9,15 +9,15 @@ description: Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = +0;
|
||||
y = new Array();
|
||||
var x = +0;
|
||||
var y = new Array();
|
||||
y[3] = Infinity;
|
||||
y[2] = 1.7976931348623157E308; //largest finite number
|
||||
y[1] = 1;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,15 +11,15 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = +0;
|
||||
y = new Array();
|
||||
var x = +0;
|
||||
var y = new Array();
|
||||
y[0] = -Infinity;
|
||||
y[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
y[2] = -1;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -9,14 +9,14 @@ description: Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -0;
|
||||
y = new Array();
|
||||
var x = -0;
|
||||
var y = new Array();
|
||||
y[0] = 1;
|
||||
y[1] = 111;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,8 +11,8 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = +0;
|
||||
x = new Array();
|
||||
var y = +0;
|
||||
var x = new Array();
|
||||
x[0] = -Infinity;
|
||||
x[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[2] = -0.000000000000001;
|
||||
|
@ -22,9 +22,9 @@ x[5] = 0.000000000000001;
|
|||
x[6] = 1.7976931348623157E308; //largest finite number
|
||||
x[7] = +Infinity;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,16 +11,16 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -0;
|
||||
y = new Array();
|
||||
var x = -0;
|
||||
var y = new Array();
|
||||
y[0] = 0.000000000000001;
|
||||
y[1] = 2;
|
||||
y[2] = Math.PI;
|
||||
y[3] = 1.7976931348623157E308; //largest finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,14 +11,14 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -0;
|
||||
y = new Array();
|
||||
var x = -0;
|
||||
var y = new Array();
|
||||
y[2] = -1;
|
||||
y[1] = -111;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,16 +11,16 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = -0;
|
||||
y = new Array();
|
||||
var x = -0;
|
||||
var y = new Array();
|
||||
y[4] = -0.000000000000001;
|
||||
y[3] = -2;
|
||||
y[2] = -Math.PI;
|
||||
y[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -13,13 +13,13 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = NaN;
|
||||
x = new Array();
|
||||
var y = new Array();
|
||||
var x = new Array();
|
||||
x[0] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[1] = -Math.PI;
|
||||
x[2] = -1;
|
||||
x[3] = -0.000000000000001;
|
||||
xnum = 4;
|
||||
var xnum = 4;
|
||||
|
||||
y[0] = -Math.PI;
|
||||
y[1] = -Math.E;
|
||||
|
@ -29,9 +29,9 @@ y[4] = 0.000000000000001;
|
|||
y[5] = 1.000000000000001;
|
||||
y[6] = Math.E;
|
||||
y[7] = Math.PI;
|
||||
ynum = 8;
|
||||
var ynum = 8;
|
||||
|
||||
for (i = 0; i < xnum; i++)
|
||||
for (j = 0; j < ynum; j++)
|
||||
for (var i = 0; i < xnum; i++)
|
||||
for (var j = 0; j < ynum; j++)
|
||||
if (!isNaN(Math.pow(x[i],y[j])))
|
||||
$ERROR("#1: isNaN(Math.pow(" + x[i] + ", " + y[j] + ")) === false");
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x1 = new Array();
|
||||
x1[0] = 0.00000000000000000000;
|
||||
x1[1] = 0.25396825396825395000;
|
||||
|
@ -221,7 +221,7 @@ y[63] = 18446744073709552000.00000000000000000000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.pow(x1[i], x2[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -11,8 +11,8 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = +0;
|
||||
x = new Array();
|
||||
var y = +0;
|
||||
var x = new Array();
|
||||
x[0] = -Infinity;
|
||||
x[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[2] = -0.000000000000001;
|
||||
|
@ -22,9 +22,9 @@ x[5] = 0.000000000000001;
|
|||
x[6] = 1.7976931348623157E308; //largest finite number
|
||||
x[7] = +Infinity;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@ description: Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero
|
|||
|
||||
// CHECK#1
|
||||
|
||||
x = NaN;
|
||||
y = new Array();
|
||||
var x = NaN;
|
||||
var y = new Array();
|
||||
y[0] = -Infinity;
|
||||
y[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
y[2] = -0.000000000000001;
|
||||
|
@ -18,9 +18,9 @@ y[3] = 0.000000000000001;
|
|||
y[4] = 1.7976931348623157E308; //largest finite number
|
||||
y[5] = +Infinity;
|
||||
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])))
|
||||
{
|
||||
|
|
|
@ -11,17 +11,17 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = +Infinity;
|
||||
x = new Array();
|
||||
var y = +Infinity;
|
||||
var x = new Array();
|
||||
x[0] = -Infinity;
|
||||
x[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[2] = -1.000000000000001;
|
||||
x[3] = 1.000000000000001;
|
||||
x[4] = 1.7976931348623157E308; //largest finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -11,17 +11,17 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = -Infinity;
|
||||
x = new Array();
|
||||
var y = -Infinity;
|
||||
var x = new Array();
|
||||
x[0] = -Infinity;
|
||||
x[1] = -1.7976931348623157E308; //largest (by module) finite number
|
||||
x[2] = -1.000000000000001;
|
||||
x[3] = 1.000000000000001;
|
||||
x[4] = 1.7976931348623157E308; //largest finite number
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -12,13 +12,13 @@ includes: [$FAIL.js]
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = +Infinity;
|
||||
x = new Array();
|
||||
var y = +Infinity;
|
||||
var x = new Array();
|
||||
x[0] = -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)))
|
||||
{
|
||||
|
|
|
@ -12,13 +12,13 @@ includes: [$FAIL.js]
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = -Infinity;
|
||||
x = new Array();
|
||||
var y = -Infinity;
|
||||
var x = new Array();
|
||||
x[0] = -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)))
|
||||
{
|
||||
|
|
|
@ -11,17 +11,17 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
|
||||
y = +Infinity;
|
||||
x = new Array();
|
||||
var y = +Infinity;
|
||||
var x = new Array();
|
||||
x[0] = 0.999999999999999;
|
||||
x[1] = 0.5;
|
||||
x[2] = +0;
|
||||
x[3] = -0;
|
||||
x[4] = -0.5;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -12,9 +12,9 @@ description: >
|
|||
---*/
|
||||
|
||||
// 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)
|
||||
{
|
||||
$ERROR("#1: Math.random() = " + val);
|
||||
|
|
|
@ -13,9 +13,9 @@ description: >
|
|||
---*/
|
||||
|
||||
// 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))
|
||||
{
|
||||
$ERROR("#1: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'")
|
||||
|
|
|
@ -12,17 +12,17 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
prec = 0.000000000003;
|
||||
var prec = 0.000000000003;
|
||||
//prec = 0.000000000000001;
|
||||
period = 2*Math.PI;
|
||||
pernum = 100;
|
||||
var period = 2*Math.PI;
|
||||
var pernum = 100;
|
||||
|
||||
a = -pernum * period;
|
||||
b = pernum * period;
|
||||
snum = 9;
|
||||
step = period/snum + 0.0;
|
||||
x = new Array();
|
||||
for (i = 0; i < snum; i++)
|
||||
var a = -pernum * period;
|
||||
var b = pernum * period;
|
||||
var snum = 9;
|
||||
var step = period/snum + 0.0;
|
||||
var x = new Array();
|
||||
for (var i = 0; i < snum; i++)
|
||||
{
|
||||
x[i] = a + i*step;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ for (i = 0; i < snum; i++)
|
|||
{
|
||||
curval = Math.sin(x[i]);
|
||||
curx = x[i] + period;
|
||||
j = 0;
|
||||
var j = 0;
|
||||
while (curx <= b)
|
||||
{
|
||||
curx += period;
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = 0.00000000000000000000;
|
||||
x[1] = 0.09973310011396169200;
|
||||
|
@ -155,7 +155,7 @@ y[62] = -0.09956784659581728600;
|
|||
y[63] = -0.00008530717948287973;
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.sin(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
x[0] = 0.00000000000000000000;
|
||||
x[1] = 0.25396825396825395000;
|
||||
|
@ -153,7 +153,7 @@ y[63] = 4.00000000000000000000;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.sqrt(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
|
@ -12,17 +12,17 @@ includes: [$FAIL.js]
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
prec = 0.00000000003;
|
||||
var prec = 0.00000000003;
|
||||
//prec = 0.000000000000001;
|
||||
period = Math.PI;
|
||||
pernum = 100;
|
||||
var period = Math.PI;
|
||||
var pernum = 100;
|
||||
|
||||
a = -pernum * period + period/2;
|
||||
b = pernum * period - period/2;
|
||||
snum = 9;
|
||||
step = period/(snum + 2);
|
||||
x = new Array();
|
||||
for (i = 0; i <= snum; i++) //// We exlude special points
|
||||
var a = -pernum * period + period/2;
|
||||
var b = pernum * period - period/2;
|
||||
var snum = 9;
|
||||
var step = period/(snum + 2);
|
||||
var x = new Array();
|
||||
for (var i = 0; i <= snum; i++) //// We exlude special points
|
||||
{ //// in this cycle.
|
||||
x[i] = a + (i+1)*step; ////
|
||||
} ////
|
||||
|
@ -35,7 +35,7 @@ for (i = 0; i < snum; i++)
|
|||
{
|
||||
curval = Math.tan(x[i]);
|
||||
curx = x[i] + period;
|
||||
j = 0;
|
||||
var j = 0;
|
||||
while (curx <= b)
|
||||
{
|
||||
curx += period;
|
||||
|
|
|
@ -16,7 +16,7 @@ includes:
|
|||
---*/
|
||||
|
||||
// CHECK#1
|
||||
vnum = 64;
|
||||
var vnum = 64;
|
||||
var x = new Array();
|
||||
// Result is implementation dependent and varies on platform as you approach limits.
|
||||
// e.g. Output approaches Infinity as input approaches PI / 2 (1.5707963267948966)
|
||||
|
@ -157,7 +157,7 @@ y[63] = 10381.32741756979;
|
|||
|
||||
|
||||
var val;
|
||||
for (i = 0; i < vnum; i++)
|
||||
for (var i = 0; i < vnum; i++)
|
||||
{
|
||||
val = Math.tan(x[i]);
|
||||
if (!isEqual(val, y[i]))
|
||||
|
|
Loading…
Reference in New Issue