aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.8.2.13_pow.json
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/scripts/testcases2/15.8.2.13_pow.json')
-rw-r--r--website/resources/scripts/testcases2/15.8.2.13_pow.json152
1 files changed, 152 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.8.2.13_pow.json b/website/resources/scripts/testcases2/15.8.2.13_pow.json
new file mode 100644
index 000000000..59d908950
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.13_pow.json
@@ -0,0 +1,152 @@
+{
+ "testCollection": {
+ "name": "15.8.2.13_pow",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where y is NaN",
+ "test": "// CHECK#1\n\ny = NaN;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A1"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where abs(x)<1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = 0.999999999999999;\nx[1] = 0.5;\nx[2] = +0;\nx[3] = -0;\nx[4] = -0.5;\nx[5] = -0.999999999999999;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A10"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is +Infinity and y>0",
+ "test": "// CHECK#1\n\nx = +Infinity;\ny = new Array();\ny[3] = Infinity;\ny[2] = 1.7976931348623157E308; //largest (by module) finite number\ny[1] = 1;\ny[0] = 0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A11"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is +Infinity and y<0",
+ "test": "// CHECK#1\n\nx = +Infinity;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -1;\ny[3] = -0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A12"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -Infinity, where x is -Infinity and y>0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[0] = 1;\ny[1] = 111;\ny[2] = 111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A13"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is -Infinity and y>0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 2;\ny[2] = Math.PI;\ny[3] = 1.7976931348623157E308; //largest finite number\ny[4] = +Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A14"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -0, where x is -Infinity and y<0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[2] = -1;\ny[1] = -111; \ny[0] = -111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A15"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is -Infinity and y<0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[4] = -0.000000000000001;\ny[3] = -2;\ny[2] = -Math.PI;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[0] = -Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A16"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0",
+ "test": "// CHECK#1\n\nx = +0;\ny = new Array();\ny[3] = Infinity;\ny[2] = 1.7976931348623157E308; //largest finite number\ny[1] = 1;\ny[0] = 0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A17"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is +0 and y<0",
+ "test": "// CHECK#1\n\nx = +0;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -1;\ny[3] = -0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A18"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[0] = 1;\ny[1] = 111;\ny[2] = 111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A19"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to 1, where y is +0 and x is number or NaN",
+ "test": "// CHECK#1\n\ny = +0;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== 1)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== 1\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A2"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is -0 and y>0 and y is NOT an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 2;\ny[2] = Math.PI;\ny[3] = 1.7976931348623157E308; //largest finite number\ny[4] = +Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A20"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -Infinity, where x is -0 and y is an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[2] = -1;\ny[1] = -111; \ny[0] = -111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A21"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is -0 and y<0 and y is NOT an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[4] = -0.000000000000001;\ny[3] = -2;\ny[2] = -Math.PI;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[0] = -Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A22"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where x<0 and x is finite and y is finite and y is not an integer",
+ "test": "// CHECK#1\n\ny = NaN;\nx = new Array();\nx[0] = -1.7976931348623157E308; //largest (by module) finite number\nx[1] = -Math.PI;\nx[2] = -1;\nx[3] = -0.000000000000001;\nxnum = 4;\n\ny[0] = -Math.PI;\ny[1] = -Math.E;\ny[2] = -1.000000000000001;\ny[3] = -0.000000000000001;\ny[4] = 0.000000000000001;\ny[5] = 1.000000000000001;\ny[6] = Math.E;\ny[7] = Math.PI;\nynum = 8;\n\nfor (i = 0; i < xnum; i++)\n\tfor (j = 0; j < ynum; j++)\n\t\tif (!isNaN(Math.pow(x[i],y[j])))\n\t\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y[j] + \")) === false\");\n",
+ "id": "S15.8.2.13_A23"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": ": Checking if Math.pow(argument1, argument2) is approximately equals to its mathematical value on the set of 64 argument1 values and 64 argument2 values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x1 = new Array();\nx1[0] = 0.00000000000000000000;\nx1[1] = 0.25396825396825395000;\nx1[2] = 0.50793650793650791000;\nx1[3] = 0.76190476190476186000;\nx1[4] = 1.01587301587301580000;\nx1[5] = 1.26984126984126980000;\nx1[6] = 1.52380952380952370000;\nx1[7] = 1.77777777777777770000;\nx1[8] = 2.03174603174603160000;\nx1[9] = 2.28571428571428560000;\nx1[10] = 2.53968253968253950000;\nx1[11] = 2.79365079365079350000;\nx1[12] = 3.04761904761904740000;\nx1[13] = 3.30158730158730140000;\nx1[14] = 3.55555555555555540000;\nx1[15] = 3.80952380952380930000;\nx1[16] = 4.06349206349206330000;\nx1[17] = 4.31746031746031720000;\nx1[18] = 4.57142857142857120000;\nx1[19] = 4.82539682539682510000;\nx1[20] = 5.07936507936507910000;\nx1[21] = 5.33333333333333300000;\nx1[22] = 5.58730158730158700000;\nx1[23] = 5.84126984126984090000;\nx1[24] = 6.09523809523809490000;\nx1[25] = 6.34920634920634890000;\nx1[26] = 6.60317460317460280000;\nx1[27] = 6.85714285714285680000;\nx1[28] = 7.11111111111111070000;\nx1[29] = 7.36507936507936470000;\nx1[30] = 7.61904761904761860000;\nx1[31] = 7.87301587301587260000;\nx1[32] = 8.12698412698412650000;\nx1[33] = 8.38095238095238140000;\nx1[34] = 8.63492063492063440000;\nx1[35] = 8.88888888888888930000;\nx1[36] = 9.14285714285714230000;\nx1[37] = 9.39682539682539720000;\nx1[38] = 9.65079365079365030000;\nx1[39] = 9.90476190476190510000;\nx1[40] = 10.15873015873015800000;\nx1[41] = 10.41269841269841300000;\nx1[42] = 10.66666666666666600000;\nx1[43] = 10.92063492063492100000;\nx1[44] = 11.17460317460317400000;\nx1[45] = 11.42857142857142900000;\nx1[46] = 11.68253968253968200000;\nx1[47] = 11.93650793650793700000;\nx1[48] = 12.19047619047619000000;\nx1[49] = 12.44444444444444500000;\nx1[50] = 12.69841269841269800000;\nx1[51] = 12.95238095238095300000;\nx1[52] = 13.20634920634920600000;\nx1[53] = 13.46031746031746000000;\nx1[54] = 13.71428571428571400000;\nx1[55] = 13.96825396825396800000;\nx1[56] = 14.22222222222222100000;\nx1[57] = 14.47619047619047600000;\nx1[58] = 14.73015873015872900000;\nx1[59] = 14.98412698412698400000;\nx1[60] = 15.23809523809523700000;\nx1[61] = 15.49206349206349200000;\nx1[62] = 15.74603174603174500000;\nx1[63] = 16.00000000000000000000;\n\n\n\nvar x2 = new Array();\nx2[0] = -16.00000000000000000000;\nx2[1] = -15.49206349206349200000;\nx2[2] = -14.98412698412698400000;\nx2[3] = -14.47619047619047600000;\nx2[4] = -13.96825396825396800000;\nx2[5] = -13.46031746031746000000;\nx2[6] = -12.95238095238095300000;\nx2[7] = -12.44444444444444500000;\nx2[8] = -11.93650793650793700000;\nx2[9] = -11.42857142857142900000;\nx2[10] = -10.92063492063492100000;\nx2[11] = -10.41269841269841300000;\nx2[12] = -9.90476190476190510000;\nx2[13] = -9.39682539682539720000;\nx2[14] = -8.88888888888888930000;\nx2[15] = -8.38095238095238140000;\nx2[16] = -7.87301587301587350000;\nx2[17] = -7.36507936507936560000;\nx2[18] = -6.85714285714285770000;\nx2[19] = -6.34920634920634970000;\nx2[20] = -5.84126984126984180000;\nx2[21] = -5.33333333333333390000;\nx2[22] = -4.82539682539682600000;\nx2[23] = -4.31746031746031810000;\nx2[24] = -3.80952380952381020000;\nx2[25] = -3.30158730158730230000;\nx2[26] = -2.79365079365079440000;\nx2[27] = -2.28571428571428650000;\nx2[28] = -1.77777777777777860000;\nx2[29] = -1.26984126984127070000;\nx2[30] = -0.76190476190476275000;\nx2[31] = -0.25396825396825484000;\nx2[32] = 0.25396825396825307000;\nx2[33] = 0.76190476190476275000;\nx2[34] = 1.26984126984126890000;\nx2[35] = 1.77777777777777860000;\nx2[36] = 2.28571428571428470000;\nx2[37] = 2.79365079365079440000;\nx2[38] = 3.30158730158730050000;\nx2[39] = 3.80952380952381020000;\nx2[40] = 4.31746031746031630000;\nx2[41] = 4.82539682539682600000;\nx2[42] = 5.33333333333333210000;\nx2[43] = 5.84126984126984180000;\nx2[44] = 6.34920634920634800000;\nx2[45] = 6.85714285714285770000;\nx2[46] = 7.36507936507936380000;\nx2[47] = 7.87301587301587350000;\nx2[48] = 8.38095238095237960000;\nx2[49] = 8.88888888888888930000;\nx2[50] = 9.39682539682539540000;\nx2[51] = 9.90476190476190510000;\nx2[52] = 10.41269841269841100000;\nx2[53] = 10.92063492063492100000;\nx2[54] = 11.42857142857142700000;\nx2[55] = 11.93650793650793700000;\nx2[56] = 12.44444444444444300000;\nx2[57] = 12.95238095238095300000;\nx2[58] = 13.46031746031745900000;\nx2[59] = 13.96825396825396800000;\nx2[60] = 14.47619047619047400000;\nx2[61] = 14.98412698412698400000;\nx2[62] = 15.49206349206349000000;\nx2[63] = 16.00000000000000000000;\n\n\nvar y = new Array();\ny[0] = +Infinity;\ny[1] = 1664158979.11096290000000000000;\ny[2] = 25596.98862206424700000000;\ny[3] = 51.24224360332205900000;\ny[4] = 0.80253721621001273000;\ny[5] = 0.04013281604184240600;\ny[6] = 0.00427181167466968250;\ny[7] = 0.00077698684629307839;\ny[8] = 0.00021140449751288852;\ny[9] = 0.00007886641216275820;\ny[10] = 0.00003797970495625904;\ny[11] = 0.00002260186576944384;\ny[12] = 0.00001608735704675994;\ny[13] = 0.00001335526639440840;\ny[14] = 0.00001267782407825002;\ny[15] = 0.00001354410739307298;\ny[16] = 0.00001607404700077214;\ny[17] = 0.00002096489798949858;\ny[18] = 0.00002978033411316872;\ny[19] = 0.00004572015769326707;\ny[20] = 0.00007536620884896827;\ny[21] = 0.00013263967558882687;\ny[22] = 0.00024800091950917796;\ny[23] = 0.00049049578772052680;\ny[24] = 0.00102225521238885490;\ny[25] = 0.00223744147356661880;\ny[26] = 0.00512739755878587920;\ny[27] = 0.01226918030754863000;\ny[28] = 0.03058049475427409400;\ny[29] = 0.07921771472569966200;\ny[30] = 0.21285098601167457000;\ny[31] = 0.59211846233860321000;\ny[32] = 1.70252376919407730000;\ny[33] = 5.05197994186350920000;\ny[34] = 15.44896866758827700000;\ny[35] = 48.62279949816147700000;\ny[36] = 157.31086033139039000000;\ny[37] = 522.60021277476767000000;\ny[38] = 1780.82316713426990000000;\ny[39] = 6218.58509846337710000000;\ny[40] = 22232.54916898025500000000;\ny[41] = 81310.50695814844200000000;\ny[42] = 303962.39599994919000000000;\ny[43] = 1160609.39151835810000000000;\ny[44] = 4523160.16396183520000000000;\ny[45] = 17980506.53105686600000000000;\ny[46] = 72861260.63140085300000000000;\ny[47] = 300795965.18372804000000000000;\ny[48] = 1264408843.88636260000000000000;\ny[49] = 5408983705.82595920000000000000;\ny[50] = 23536438485.32324600000000000000;\ny[51] = 104125724201.77888000000000000000;\ny[52] = 468137079409.17462000000000000000;\ny[53] = 2137965865913.91260000000000000000;\ny[54] = 9914368643808.25200000000000000000;\ny[55] = 46665726995317.89800000000000000000;\ny[56] = 222863786409039.87000000000000000000;\ny[57] = 1079534443702065.00000000000000000000;\ny[58] = 5302037850329952.00000000000000000000;\ny[59] = 26394813313751084.00000000000000000000;\ny[60] = 133146543235024720.00000000000000000000;\ny[61] = 680375082351885950.00000000000000000000;\ny[62] = 3520878542447823900.00000000000000000000;\ny[63] = 18446744073709552000.00000000000000000000;\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.pow(x1[i], x2[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx1 = \" + x1[i] + \"\\nx2 = \" + x2[i] + \"\\nlibc.pow(x1,x2) = \" + y[i] + \"\\nMath.pow(x1,x2) = \" + Math.pow(x1[i], x2[i]) + \"\\nMath.abs(libc.pow(x1,x2) - Math.pow(x1,x2)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.13_A24"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to 1, where x is number or NaN and y is -0",
+ "test": "// CHECK#1\n\ny = +0;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== 1)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", -0) !== 1\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A3"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero",
+ "test": "// CHECK#1\n\nx = NaN;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -0.000000000000001;\ny[3] = 0.000000000000001;\ny[4] = 1.7976931348623157E308; //largest finite number\ny[5] = +Infinity;\ny[6] = NaN;\nynum = 7;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isNaN(Math.pow(x,y[i])))\n\t{\n\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x + \", \" + y[i] + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A4"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where abs(x)>1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -1.000000000000001;\nx[3] = 1.000000000000001;\nx[4] = 1.7976931348623157E308; //largest finite number\nx[5] = +Infinity;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A5"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where abs(x)>1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -1.000000000000001;\nx[3] = 1.000000000000001;\nx[4] = 1.7976931348623157E308; //largest finite number\nx[5] = +Infinity;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A6"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = -1;\nx[1] = 1\nxnum = 2;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$FAIL(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A7"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = -1;\nx[1] = 1\nxnum = 2;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$FAIL(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A8"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where abs(x)<1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = 0.999999999999999;\nx[1] = 0.5;\nx[2] = +0;\nx[3] = -0;\nx[4] = -0.5;\nx[5] = -0.999999999999999;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A9"
+ }
+ ]
+ }
+}