Lines Matching refs:num
70 var num = new Number(0.0);
73 num.toPrecision(0);
74 fail("#9: num.toPrecision(0) should have been thrown RangeError");
82 num.toPrecision(22);
83 fail("#11: num.toPrecision(22) should have been thrown RangeError");
90 num = new Number(23.4718);
92 if (num.toPrecision(1) != "2e+1") {
93 fail("#13: toPrecision(1) gives " + num.toPrecision(1));
96 if (num.toPrecision(2) != "23") {
97 fail("#14: toPrecision(2) gives " + num.toPrecision(2));
100 if (num.toPrecision(3) != "23.5") {
101 fail("#15: toPrecision(3) gives " + num.toPrecision(3));
104 if (num.toPrecision(11) != "23.471800000") {
105 fail("#16: toPrecision(11) gives " + num.toPrecision(11));
118 if (num.toExponential(1) != "2.3e+1") {
119 fail("#20: toExponential(1) gives " + num.toExponential(1));
122 if (num.toExponential(2) != "2.35e+1") {
123 fail("#21: toExponential(2) gives " + num.toExponential(2));
126 if (num.toExponential(3) != "2.347e+1") {
127 fail("#22: toExponential(3) gives " + num.toExponential(3));
130 if (num.toExponential(11) != "2.34718000000e+1") {
131 fail("#23: toExponential(11) gives " + num.toExponential(11));