Lines Matching refs:toPrecision
29 assertEquals("1e+27", (1.2345e+27).toPrecision(1));
30 assertEquals("1.2e+27", (1.2345e+27).toPrecision(2));
31 assertEquals("1.23e+27", (1.2345e+27).toPrecision(3));
32 assertEquals("1.234e+27", (1.2345e+27).toPrecision(4));
33 assertEquals("1.2345e+27", (1.2345e+27).toPrecision(5));
34 assertEquals("1.23450e+27", (1.2345e+27).toPrecision(6));
35 assertEquals("1.234500e+27", (1.2345e+27).toPrecision(7));
37 assertEquals("-1e+27", (-1.2345e+27).toPrecision(1));
38 assertEquals("-1.2e+27", (-1.2345e+27).toPrecision(2));
39 assertEquals("-1.23e+27", (-1.2345e+27).toPrecision(3));
40 assertEquals("-1.234e+27", (-1.2345e+27).toPrecision(4));
41 assertEquals("-1.2345e+27", (-1.2345e+27).toPrecision(5));
42 assertEquals("-1.23450e+27", (-1.2345e+27).toPrecision(6));
43 assertEquals("-1.234500e+27", (-1.2345e+27).toPrecision(7));
47 assertEquals("7", (7).toPrecision(1));
48 assertEquals("7.0", (7).toPrecision(2));
49 assertEquals("7.00", (7).toPrecision(3));
51 assertEquals("-7", (-7).toPrecision(1));
52 assertEquals("-7.0", (-7).toPrecision(2));
53 assertEquals("-7.00", (-7).toPrecision(3));
55 assertEquals("9e+1", (91).toPrecision(1));
56 assertEquals("91", (91).toPrecision(2));
57 assertEquals("91.0", (91).toPrecision(3));
58 assertEquals("91.00", (91).toPrecision(4));
60 assertEquals("-9e+1", (-91).toPrecision(1));
61 assertEquals("-91", (-91).toPrecision(2));
62 assertEquals("-91.0", (-91).toPrecision(3));
63 assertEquals("-91.00", (-91).toPrecision(4));
65 assertEquals("9e+1", (91.1234).toPrecision(1));
66 assertEquals("91", (91.1234).toPrecision(2));
67 assertEquals("91.1", (91.1234).toPrecision(3));
68 assertEquals("91.12", (91.1234).toPrecision(4));
69 assertEquals("91.123", (91.1234).toPrecision(5));
70 assertEquals("91.1234", (91.1234).toPrecision(6));
71 assertEquals("91.12340", (91.1234).toPrecision(7));
72 assertEquals("91.123400", (91.1234).toPrecision(8));
74 assertEquals("-9e+1", (-91.1234).toPrecision(1));
75 assertEquals("-91", (-91.1234).toPrecision(2));
76 assertEquals("-91.1", (-91.1234).toPrecision(3));
77 assertEquals("-91.12", (-91.1234).toPrecision(4));
78 assertEquals("-91.123", (-91.1234).toPrecision(5));
79 assertEquals("-91.1234", (-91.1234).toPrecision(6));
80 assertEquals("-91.12340", (-91.1234).toPrecision(7));
81 assertEquals("-91.123400", (-91.1234).toPrecision(8));