Lines Matching refs:toPrecision

24 This test checks a few Number.toPrecision cases, including 15145: (0.999).toPrecision(1) returns in…
29 PASS (0.999).toPrecision(1) is "1"
30 PASS (0.999).toPrecision(2) is "1.0"
31 PASS (0.999).toPrecision(3) is "0.999"
32 PASS (0.0).toPrecision(4) is "0.000"
33 PASS (-0.0).toPrecision(4) is "0.000"
34 PASS (0.0).toPrecision() is "0"
35 PASS (-0.0).toPrecision() is "0"
36 PASS (1234.567).toPrecision() is "1234.567"
37 PASS (1234.567).toPrecision(0) threw exception RangeError: toPrecision() argument must be between 1…
38 PASS (1234.567).toPrecision(null) threw exception RangeError: toPrecision() argument must be betwee…
39 PASS (1234.567).toPrecision(false) threw exception RangeError: toPrecision() argument must be betwe…
40 PASS (1234.567).toPrecision('foo') threw exception RangeError: toPrecision() argument must be betwe…
41 PASS (1234.567).toPrecision(-1) threw exception RangeError: toPrecision() argument must be between …
42 PASS (1234.567).toPrecision(1) is "1e+3"
43 PASS (1234.567).toPrecision(true) is "1e+3"
44 PASS (1234.567).toPrecision('1') is "1e+3"
45 PASS (1234.567).toPrecision(2) is "1.2e+3"
46 PASS (1234.567).toPrecision(2.9) is "1.2e+3"
47 PASS (1234.567).toPrecision(5) is "1234.6"
48 PASS (1234.567).toPrecision(21) is "1234.56700000000000728"
49 PASS (1234.567).toPrecision(22) threw exception RangeError: toPrecision() argument must be between …
50 PASS (1234.567).toPrecision(100) threw exception RangeError: toPrecision() argument must be between…
51 PASS (1234.567).toPrecision(101) threw exception RangeError: toPrecision() argument must be between…
52 PASS (1234.567).toPrecision(posInf) threw exception RangeError: toPrecision() argument must be betw…
53 PASS (1234.567).toPrecision(negInf) threw exception RangeError: toPrecision() argument must be betw…
54 PASS (1234.567).toPrecision(nan) threw exception RangeError: toPrecision() argument must be between…
55 PASS posInf.toPrecision() is "Infinity"
56 PASS negInf.toPrecision() is "-Infinity"
57 PASS nan.toPrecision() is "NaN"