Home | History | Annotate | Download | only in webkit

Lines Matching refs:Math

26 "This test checks the behavior of the Math object as described in 15.8 of the language specification."
30 shouldBe("Math.abs(NaN)", "NaN");
31 shouldBe("Math.abs(0)", "0");
32 shouldBe("Math.abs(-0)", "0");
33 shouldBe("Math.abs(1)", "1");
34 shouldBe("Math.abs(-1)", "1");
35 shouldBe("Math.abs(Number.MIN_VALUE)", "Number.MIN_VALUE");
36 shouldBe("Math.abs(-Number.MIN_VALUE)", "Number.MIN_VALUE");
37 shouldBe("Math.abs(Number.MAX_VALUE)", "Number.MAX_VALUE");
38 shouldBe("Math.abs(-Number.MAX_VALUE)", "Number.MAX_VALUE");
39 shouldBe("Math.abs(Infinity)", "Infinity");
40 shouldBe("Math.abs(-Infinity)", "Infinity");
42 shouldBe("Math.acos(NaN)", "NaN");
43 shouldBe("Math.acos(-0)", "Math.acos(0)");
44 shouldBe("Math.acos(1)", "0");
45 shouldBe("Math.acos(1.1)", "NaN");
46 shouldBe("Math.acos(-1.1)", "NaN");
47 shouldBe("Math.acos(Infinity)", "NaN");
48 shouldBe("Math.acos(-Infinity)", "NaN");
50 shouldBe("Math.asin(NaN)", "NaN");
51 shouldBe("Math.asin(0)", "0");
52 shouldBe("Math.asin(-0)", "-0");
53 shouldBe("Math.asin(1)", "-Math.asin(-1)");
54 shouldBe("Math.asin(1.1)", "NaN");
55 shouldBe("Math.asin(-1.1)", "NaN");
56 shouldBe("Math.asin(Infinity)", "NaN");
57 shouldBe("Math.asin(-Infinity)", "NaN");
59 shouldBe("Math.atan(NaN)", "NaN");
60 shouldBe("Math.atan(0)", "0");
61 shouldBe("Math.atan(-0)", "-0");
62 shouldBe("Math.atan(Infinity)", "-Math.atan(-Infinity)");
64 shouldBe("Math.atan2(NaN, NaN)", "NaN");
65 shouldBe("Math.atan2(NaN, 0)", "NaN");
66 shouldBe("Math.atan2(NaN, -0)", "NaN");
67 shouldBe("Math.atan2(NaN, 1)", "NaN");
68 shouldBe("Math.atan2(NaN, Infinity)", "NaN");
69 shouldBe("Math.atan2(NaN, -Infinity)", "NaN");
70 shouldBe("Math.atan2(0, NaN)", "NaN");
71 shouldBe("Math.atan2(-0, NaN)", "NaN");
72 shouldBe("Math.atan2(1, NaN)", "NaN");
73 shouldBe("Math.atan2(Infinity, NaN)", "NaN");
74 shouldBe("Math.atan2(-Infinity, NaN)", "NaN");
80 Math.atan2(v, w);
108 shouldBe("Math.ceil(NaN)", "NaN");
109 shouldBe("Math.ceil(0)", "0");
110 shouldBe("Math.ceil(-0)", "-0");
111 shouldBe("Math.ceil(-0.5)", "-0");
112 shouldBe("Math.ceil(1)", "1");
113 shouldBe("Math.ceil(-1)", "-1");
114 shouldBe("Math.ceil(1.1)", "2");
115 shouldBe("Math.ceil(-1.1)", "-1");
116 shouldBe("Math.ceil(Number.MIN_VALUE)", "1");
117 shouldBe("Math.ceil(-Number.MIN_VALUE)", "-0");
118 shouldBe("Math.ceil(Number.MAX_VALUE)", "Number.MAX_VALUE");
119 shouldBe("Math.ceil(-Number.MAX_VALUE)", "-Number.MAX_VALUE");
120 shouldBe("Math.ceil(Infinity)", "Infinity");
121 shouldBe("Math.ceil(-Infinity)", "-Infinity");
123 shouldBe("Math.cos(NaN)", "NaN");
124 shouldBe("Math.cos(0)", "1");
125 shouldBe("Math.cos(-0)", "1");
126 shouldBe("Math.cos(Infinity)", "NaN");
127 shouldBe("Math.cos(-Infinity)", "NaN");
129 shouldBe("Math.exp(NaN)", "NaN");
130 shouldBe("Math.exp(0)", "1");
131 shouldBe("Math.exp(-0)", "1");
132 shouldBe("Math.exp(Infinity)", "Infinity");
133 shouldBe("Math.exp(-Infinity)", "0");
135 shouldBe("Math.floor(NaN)", "NaN");
136 shouldBe("Math.floor(0)", "0");
137 shouldBe("Math.floor(-0)", "-0");
138 shouldBe("Math.floor(0.5)", "0");
139 shouldBe("Math.floor(1)", "1");
140 shouldBe("Math.floor(-1)", "-1");
141 shouldBe("Math.floor(1.1)", "1");
142 shouldBe("Math.floor(-1.1)", "-2");
143 shouldBe("Math.floor(Number.MIN_VALUE)", "0");
144 shouldBe("Math.floor(-Number.MIN_VALUE)", "-1");
145 shouldBe("Math.floor(Number.MAX_VALUE)", "Number.MAX_VALUE");
146 shouldBe("Math.floor(-Number.MAX_VALUE)", "-Number.MAX_VALUE");
147 shouldBe("Math.floor(Infinity)", "Infinity");
148 shouldBe("Math.floor(-Infinity)", "-Infinity");
150 shouldBe("Math.log(NaN)", "NaN");
151 shouldBe("Math.log(0)", "-Infinity");
152 shouldBe("Math.log(-0)", "-Infinity");
153 shouldBe("Math.log(1)", "0");
154 shouldBe("Math.log(-1)", "NaN");
155 shouldBe("Math.log(-1.1)", "NaN");
156 shouldBe("Math.log(Infinity)", "Infinity");
157 shouldBe("Math.log(-Infinity)", "NaN");
159 shouldBe("Math.max()", "-Infinity");
160 shouldBe("Math.max(NaN)", "NaN");
161 shouldBe("Math.max(NaN,1)", "NaN");
162 shouldBe("Math.max(0)", "0");
163 shouldBe("Math.max(-0)", "-0");
164 shouldBe("Math.max(-0, 0)", "0");
166 shouldBe("Math.min()", "Infinity");
167 shouldBe("Math.min(NaN)", "NaN");
168 shouldBe("Math.min(NaN,1)", "NaN");
169 shouldBe("Math.min(0)", "0");
170 shouldBe("Math.min(-0)", "-0");
171 shouldBe("Math.min(-0, 0)", "-0");
173 shouldBe("Math.pow(NaN, NaN)", "NaN");
174 shouldBe("Math.pow(NaN, 0)", "1");
175 shouldBe("Math.pow(NaN, -0)", "1");
176 shouldBe("Math.pow(NaN, 1)", "NaN");
177 shouldBe("Math.pow(NaN, Infinity)", "NaN");
178 shouldBe("Math.pow(NaN, -Infinity)", "NaN");
179 shouldBe("Math.pow(0, NaN)", "NaN");
180 shouldBe("Math.pow(-0, NaN)", "NaN");
181 shouldBe("Math.pow(1, NaN)", "NaN");
182 shouldBe("Math.pow(Infinity, NaN)", "NaN");
183 shouldBe("Math.pow(-Infinity, NaN)", "NaN");
207 shouldBe("Math.round(NaN)", "NaN");
208 shouldBe("Math.round(0)", "0");
209 shouldBe("Math.round(-0)", "-0");
210 shouldBe("Math.round(0.4)", "0");
211 shouldBe("Math.round(-0.4)", "-0");
212 shouldBe("Math.round(0.5)", "1");
213 shouldBe("Math.round(-0.5)", "-0");
214 shouldBe("Math.round(0.6)", "1");
215 shouldBe("Math.round(-0.6)", "-1");
216 shouldBe("Math.round(1)", "1");
217 shouldBe("Math.round(-1)", "-1");
218 shouldBe("Math.round(1.1)", "1");
219 shouldBe("Math.round(-1.1)", "-1");
220 shouldBe("Math.round(1.5)", "2");
221 shouldBe("Math.round(-1.5)", "-1");
222 shouldBe("Math.round(1.6)", "2");
223 shouldBe("Math.round(-1.6)", "-2");
224 shouldBe("Math.round(8640000000000000)", "8640000000000000");
226 shouldBe("Math.round(8640000000000000.5)", "8640000000000000");
227 shouldBe("Math.round(8640000000000001)", "8640000000000001");
228 shouldBe("Math.round(8640000000000002)", "8640000000000002");
229 shouldBe("Math.round(9007199254740990)", "9007199254740990");
230 shouldBe("Math.round(9007199254740991)", "9007199254740991");
231 shouldBe("Math.round(1.7976931348623157e+308)", "1.7976931348623157e+308");
232 shouldBe("Math.round(-8640000000000000)", "-8640000000000000");
233 shouldBe("Math.round(-8640000000000001)", "-8640000000000001");
234 shouldBe("Math.round(-8640000000000002)", "-8640000000000002");
235 shouldBe("Math.round(-9007199254740990)", "-9007199254740990");
236 shouldBe("Math.round(-9007199254740991)", "-9007199254740991");
237 shouldBe("Math.round(-1.7976931348623157e+308)", "-1.7976931348623157e+308");
238 shouldBe("Math.round(Infinity)", "Infinity");
239 shouldBe("Math.round(-Infinity)", "-Infinity");
241 shouldBe("Math.sin(NaN)", "NaN");
242 shouldBe("Math.sin(0)", "0");
243 shouldBe("Math.sin(-0)", "-0");
244 shouldBe("Math.sin(Infinity)", "NaN");
245 shouldBe("Math.sin(-Infinity)", "NaN");
247 shouldBe("Math.sqrt(NaN)", "NaN");
248 shouldBe("Math.sqrt(0)", "0");
249 shouldBe("Math.sqrt(-0)", "-0");
250 shouldBe("Math.sqrt(1)", "1");
251 shouldBe("Math.sqrt(-1)", "NaN");
252 shouldBe("Math.sqrt(Infinity)", "Infinity");
253 shouldBe("Math.sqrt(-Infinity)", "NaN");
255 shouldBe("Math.tan(NaN)", "NaN");
256 shouldBe("Math.tan(0)", "0");
257 shouldBe("Math.tan(-0)", "-0");
258 shouldBe("Math.tan(Infinity)", "NaN");
259 shouldBe("Math.tan(-Infinity)", "NaN");
261 var __Math = Math;
262 shouldBeTrue("delete Math;");
265 shouldBeFalse("'Math' in global()");
267 Math = __Math;