Lines Matching refs:abs

36   assertEquals(0, Math.abs(0));
37 assertEquals(0, Math.abs(zero()));
38 assertEquals(0, Math.abs(-0));
39 assertEquals(Infinity, Math.abs(Infinity));
40 assertEquals(Infinity, Math.abs(-Infinity));
41 assertEquals(NaN, Math.abs(NaN));
42 assertEquals(NaN, Math.abs(-NaN));
43 assertEquals('Infinity', Math.abs(Number('+Infinity')).toString());
44 assertEquals('Infinity', Math.abs(Number('-Infinity')).toString());
45 assertEquals('NaN', Math.abs(NaN).toString());
46 assertEquals('NaN', Math.abs(-NaN).toString());
48 assertEquals(0.1, Math.abs(0.1));
49 assertEquals(0.5, Math.abs(0.5));
50 assertEquals(0.1, Math.abs(-0.1));
51 assertEquals(0.5, Math.abs(-0.5));
52 assertEquals(1, Math.abs(1));
53 assertEquals(1.1, Math.abs(1.1));
54 assertEquals(1.5, Math.abs(1.5));
55 assertEquals(1, Math.abs(-1));
56 assertEquals(1.1, Math.abs(-1.1));
57 assertEquals(1.5, Math.abs(-1.5));
59 assertEquals(Number.MIN_VALUE, Math.abs(Number.MIN_VALUE));
60 assertEquals(Number.MIN_VALUE, Math.abs(-Number.MIN_VALUE));
61 assertEquals(Number.MAX_VALUE, Math.abs(Number.MAX_VALUE));
62 assertEquals(Number.MAX_VALUE, Math.abs(-Number.MAX_VALUE));
67 assertEquals(two_30, Math.abs(two_30));
68 assertEquals(two_30, Math.abs(-two_30));
70 assertEquals(two_30 + 1, Math.abs(two_30 + 1));
71 assertEquals(two_30 + 1, Math.abs(-two_30 - 1));
73 assertEquals(two_30 - 1, Math.abs(two_30 - 1));
74 assertEquals(two_30 - 1, Math.abs(-two_30 + 1));
79 assertEquals(two_31, Math.abs(two_31));
80 assertEquals(two_31, Math.abs(-two_31));
82 assertEquals(two_31 + 1, Math.abs(two_31 + 1));
83 assertEquals(two_31 + 1, Math.abs(-two_31 - 1));
85 assertEquals(two_31 - 1, Math.abs(two_31 - 1));
86 assertEquals(two_31 - 1, Math.abs(-two_31 + 1));
88 assertEquals(NaN, Math.abs("not a number"));
89 assertEquals(NaN, Math.abs([1, 2, 3]));
90 assertEquals(42, Math.abs({valueOf: function() { return 42; } }));
91 assertEquals(42, Math.abs({valueOf: function() { return -42; } }));
103 return Math.abs(x);
117 return Math.abs(a[0]);
127 var half = Math.abs(x);