@@ -87,181 +87,198 @@ is_approx(atan2(-4, -4), -3 * pi / 4, "atan2(-4, -4) is -3pi / 4");
87
87
88
88
{
89
89
# Num tests
90
- is_approx(atan2 ((-0.1 ). Num ), -0.099668652491162 , " atan2(Num)" );
90
+ is_approx(atan2 ((-100 ). Num ), -1.56079666010823 , " atan2(Num)" );
91
91
}
92
92
93
93
{
94
94
# Num vs Num tests
95
- is_approx((- 0.1 ). Num . atan2 ((-0. 1 ). Num ), -2.35619449019234 , " Num.atan2(Num)" );
96
- is_approx(atan2 ((1 ). Num , (-10 ). Num ), 3.04192400109863 , " atan2(Num, Num)" );
95
+ is_approx((0.1 ). Num . atan2 ((-1 ). Num ), 3.04192400109863 , " Num.atan2(Num)" );
96
+ is_approx(atan2 ((10 ). Num , (1 ). Num ), 1.47112767430373 , " atan2(Num, Num)" );
97
97
}
98
98
99
99
{
100
100
# Num vs Rat tests
101
- is_approx((-100 ). Num . atan2 ((100 ). Rat (1e-9 )), -0.785398163397448 , " Num.atan2(Rat)" );
102
- is_approx(atan2 ((-1 ). Num , (0.1 ). Rat (1e-9 )), -1.47112767430373 , " atan2(Num, Rat)" );
101
+ is_approx((-10 ). Num . atan2 ((10 ). Rat (1e-9 )), -0.785398163397448 , " Num.atan2(Rat)" );
102
+ is_approx(atan2 ((-100 ). Num , (0.1 ). Rat (1e-9 )), -1.56979632712823 , " atan2(Num, Rat)" );
103
103
}
104
104
105
105
{
106
106
# Num vs Int tests
107
- is_approx((-100 ). Num . atan2 ((-1 ). Int ), -1.58079599348156 , " Num.atan2(Int)" );
108
- is_approx(atan2 ((100 ). Num , (-100 ). Int ), 2.35619449019234 , " atan2(Num, Int)" );
107
+ is_approx((-0.1 ). Num . atan2 ((-1 ). Int ), -3.04192400109863 , " Num.atan2(Int)" );
108
+ is_approx(atan2 ((0.1 ). Num , (-100 ). Int ), 3.14059265392313 , " atan2(Num, Int)" );
109
109
}
110
110
111
+ # ?niecza skip 'Str math NYI'
111
112
{
112
113
# Num vs Str tests
113
- is_approx((100 ). Num . atan2 ((-0. 1 ). Str ), 1.57179632646156 , " Num.atan2(Str)" );
114
- is_approx(atan2 ((10 ). Num , (-100 ). Str ), 3.04192400109863 , " atan2(Num, Str)" );
114
+ is_approx((- 100 ). Num . atan2 ((-1 ). Str ), -1.58079599348156 , " Num.atan2(Str)" );
115
+ is_approx(atan2 ((1 ). Num , (-100 ). Str ), 3.13159298690313 , " atan2(Num, Str)" );
115
116
}
116
117
118
+ # ?niecza skip 'DifferentReal math NYI'
117
119
{
118
120
# Num vs DifferentReal tests
119
- is_approx((0.1 ). Num . atan2 (DifferentReal. new (-0. 1 )), 2.35619449019234 , " Num.atan2(DifferentReal)" );
120
- is_approx(atan2 ((1 ). Num , DifferentReal. new (-0.1 )), 1.67046497928606 , " atan2(Num, DifferentReal)" );
121
+ is_approx((-10 ). Num . atan2 (DifferentReal. new (-1 )), -1.67046497928606 , " Num.atan2(DifferentReal)" );
122
+ is_approx(atan2 ((-100 ). Num , DifferentReal. new (100 )), -0.785398163397448 , " atan2(Num, DifferentReal)" );
121
123
}
122
124
123
125
{
124
126
# Rat tests
125
- is_approx((1 ). Rat (1e-9 ). atan2 , 0.785398163397448 , " Rat.atan2" );
126
- is_approx(atan2 ((-0. 1 ). Rat (1e-9 )), -0.099668652491162 , " atan2(Rat)" );
127
+ is_approx((- 1 ). Rat (1e-9 ). atan2 , - 0.785398163397448 , " Rat.atan2" );
128
+ is_approx(atan2 ((-1 ). Rat (1e-9 )), -0.785398163397448 , " atan2(Rat)" );
127
129
}
128
130
129
131
{
130
132
# Rat vs Num tests
131
- is_approx((1 ). Rat (1e-9 ). atan2 ((0.1 ). Num ), 1.47112767430373 , " Rat.atan2(Num)" );
132
- is_approx(atan2 ((0.1 ). Rat (1e-9 ), (-100 ). Num ), 3.14059265392313 , " atan2(Rat, Num)" );
133
+ is_approx((-100 ). Rat (1e-9 ). atan2 ((10 ). Num ), - 1.47112767430373 , " Rat.atan2(Num)" );
134
+ is_approx(atan2 ((-100 ). Rat (1e-9 ), (-1 ). Num ), -1.58079599348156 , " atan2(Rat, Num)" );
133
135
}
134
136
135
137
{
136
138
# Rat vs Rat tests
137
- is_approx((100 ). Rat (1e-9 ). atan2 ((100 ). Rat (1e-9 )), 0.785398163397448 , " Rat.atan2(Rat)" );
138
- is_approx(atan2 ((-1 ). Rat (1e-9 ), (-0.1 ). Rat (1e-9 )), -1.67046497928606 , " atan2(Rat, Rat)" );
139
+ is_approx((-10 ). Rat (1e-9 ). atan2 ((-0.1 ). Rat (1e-9 )), -1.58079599348156 , " Rat.atan2(Rat)" );
140
+ is_approx(atan2 ((10 ). Rat (1e-9 ), (100 ). Rat (1e-9 )), 0.099668652491162 , " atan2(Rat, Rat)" );
139
141
}
140
142
141
143
{
142
144
# Rat vs Int tests
143
- is_approx((-100 ). Rat (1e-9 ). atan2 ((10 ). Int ), -1.47112767430373 , " Rat.atan2(Int)" );
144
- is_approx(atan2 ((-100 ). Rat (1e-9 ), (10 ). Int ), -1.47112767430373 , " atan2(Rat, Int)" );
145
+ is_approx((-100 ). Rat (1e-9 ). atan2 ((-1 ). Int ), -1.58079599348156 , " Rat.atan2(Int)" );
146
+ is_approx(atan2 ((-0.1 ). Rat (1e-9 ), (100 ). Int ), -0.000999999666666867 , " atan2(Rat, Int)" );
145
147
}
146
148
149
+ # ?niecza skip 'Str math NYI'
147
150
{
148
151
# Rat vs Str tests
149
- is_approx((10 ). Rat (1e-9 ). atan2 ((1 ). Str ), 1.47112767430373 , " Rat.atan2(Str)" );
150
- is_approx(atan2 ((-100 ). Rat (1e-9 ), (0.1 ). Str ), -1.56979632712823 , " atan2(Rat, Str)" );
152
+ is_approx((-100 ). Rat (1e-9 ). atan2 ((10 ). Str ), - 1.47112767430373 , " Rat.atan2(Str)" );
153
+ is_approx(atan2 ((-10 ). Rat (1e-9 ), (10 ). Str ), -0.785398163397448 , " atan2(Rat, Str)" );
151
154
}
152
155
156
+ # ?niecza skip 'DifferentReal math NYI'
153
157
{
154
158
# Rat vs DifferentReal tests
155
- is_approx((-10 ). Rat (1e-9 ). atan2 (DifferentReal. new (-100 )), -3.04192400109863 , " Rat.atan2(DifferentReal)" );
156
- is_approx(atan2 ((1 ). Rat (1e-9 ), DifferentReal. new (0.1 )), 1.47112767430373 , " atan2(Rat, DifferentReal)" );
159
+ is_approx((0.1 ). Rat (1e-9 ). atan2 (DifferentReal. new (-10 )), 3.13159298690313 , " Rat.atan2(DifferentReal)" );
160
+ is_approx(atan2 ((-10 ). Rat (1e-9 ), DifferentReal. new (- 0.1 )), -1.58079599348156 , " atan2(Rat, DifferentReal)" );
157
161
}
158
162
159
163
{
160
164
# Int tests
161
- is_approx((100 ). Int . atan2 , 1.56079666010823 , " Int.atan2" );
162
- is_approx(atan2 ((10 ). Int ), 1.47112767430373 , " atan2(Int)" );
165
+ is_approx((- 100 ). Int . atan2 , - 1.56079666010823 , " Int.atan2" );
166
+ is_approx(atan2 ((100 ). Int ), 1.56079666010823 , " atan2(Int)" );
163
167
}
164
168
165
169
{
166
170
# Int vs Num tests
167
- is_approx((10 ). Int . atan2 ((1 ). Num ), 1.47112767430373 , " Int.atan2(Num)" );
168
- is_approx(atan2 ((10 ). Int , (-1 ). Num ), 1.67046497928606 , " atan2(Int, Num)" );
171
+ is_approx((- 10 ). Int . atan2 ((-100 ). Num ), -3.04192400109863 , " Int.atan2(Num)" );
172
+ is_approx(atan2 ((-100 ). Int , (100 ). Num ), -0.785398163397448 , " atan2(Int, Num)" );
169
173
}
170
174
171
175
{
172
176
# Int vs Rat tests
173
- is_approx((10 ). Int . atan2 ((10 ). Rat (1e-9 )), 0.785398163397448 , " Int.atan2(Rat)" );
174
- is_approx(atan2 ((-10 ). Int , (1 ). Rat (1e-9 )), -1.47112767430373 , " atan2(Int, Rat)" );
177
+ is_approx((1 ). Int . atan2 ((10 ). Rat (1e-9 )), 0.099668652491162 , " Int.atan2(Rat)" );
178
+ is_approx(atan2 ((100 ). Int , (1 ). Rat (1e-9 )), 1.56079666010823 , " atan2(Int, Rat)" );
175
179
}
176
180
177
181
{
178
182
# Int vs Int tests
179
- is_approx((10 ). Int . atan2 ((- 10 ). Int ), 2.35619449019234 , " Int.atan2(Int)" );
183
+ is_approx((100 ). Int . atan2 ((10 ). Int ), 1.47112767430373 , " Int.atan2(Int)" );
180
184
is_approx(atan2 ((1 ). Int , (-100 ). Int ), 3.13159298690313 , " atan2(Int, Int)" );
181
185
}
182
186
187
+ # ?niecza skip 'Str math NYI'
183
188
{
184
189
# Int vs Str tests
185
- is_approx((-10 ). Int . atan2 ((100 ). Str ), -0.099668652491162 , " Int.atan2(Str)" );
186
- is_approx(atan2 ((100 ). Int , (100 ). Str ), 0.785398163397448 , " atan2(Int, Str)" );
190
+ is_approx((-1 ). Int . atan2 ((100 ). Str ), -0.00999966668666524 , " Int.atan2(Str)" );
191
+ is_approx(atan2 ((100 ). Int , (0.1 ). Str ), 1.56979632712823 , " atan2(Int, Str)" );
187
192
}
188
193
194
+ # ?niecza skip 'DifferentReal math NYI'
189
195
{
190
196
# Int vs DifferentReal tests
191
- is_approx((1 ). Int . atan2 (DifferentReal. new (1 )), 0.785398163397448 , " Int.atan2(DifferentReal)" );
192
- is_approx(atan2 ((-100 ). Int , DifferentReal. new (0.1 )), -1.56979632712823 , " atan2(Int, DifferentReal)" );
197
+ is_approx((1 ). Int . atan2 (DifferentReal. new (-10 )), 3.04192400109863 , " Int.atan2(DifferentReal)" );
198
+ is_approx(atan2 ((-1 ). Int , DifferentReal. new (10 )), -0.099668652491162 , " atan2(Int, DifferentReal)" );
193
199
}
194
200
195
201
{
196
202
# Str tests
197
- is_approx((100 ). Str . atan2 , 1.56079666010823 , " Str.atan2" );
198
- is_approx(atan2 ((0. 1 ). Str ), 0.099668652491162 , " atan2(Str)" );
203
+ is_approx((- 100 ). Str . atan2 , - 1.56079666010823 , " Str.atan2" );
204
+ is_approx(atan2 ((1 ). Str ), 0.785398163397448 , " atan2(Str)" );
199
205
}
200
206
207
+ # ?niecza skip 'Str math NYI'
201
208
{
202
209
# Str vs Num tests
203
- is_approx((10 ). Str . atan2 ((1 ). Num ), 1.47112767430373 , " Str.atan2(Num)" );
204
- is_approx(atan2 ((-100 ). Str , (1 ). Num ), -1.56079666010823 , " atan2(Str, Num)" );
210
+ is_approx((-100 ). Str . atan2 ((0. 1 ). Num ), -1.56979632712823 , " Str.atan2(Num)" );
211
+ is_approx(atan2 ((-100 ). Str , (- 1 ). Num ), -1.58079599348156 , " atan2(Str, Num)" );
205
212
}
206
213
214
+ # ?niecza skip 'Str math NYI'
207
215
{
208
216
# Str vs Rat tests
209
- is_approx((-10 ). Str . atan2 ((- 0.1 ). Rat (1e-9 )), -1.58079599348156 , " Str.atan2(Rat)" );
210
- is_approx(atan2 ((100 ). Str , (1 ). Rat (1e-9 )), 1.56079666010823 , " atan2(Str, Rat)" );
217
+ is_approx((-1 ). Str . atan2 ((0.1 ). Rat (1e-9 )), -1.47112767430373 , " Str.atan2(Rat)" );
218
+ is_approx(atan2 ((- 100 ). Str , (-10 ). Rat (1e-9 )), -1.67046497928606 , " atan2(Str, Rat)" );
211
219
}
212
220
221
+ # ?niecza skip 'Str math NYI'
213
222
{
214
223
# Str vs Int tests
215
- is_approx((-0.1 ). Str . atan2 ((1 ). Int ), -0.099668652491162 , " Str.atan2(Int)" );
216
- is_approx(atan2 ((-1 ). Str , (100 ). Int ), -0.00999966668666524 , " atan2(Str, Int)" );
224
+ is_approx((10 ). Str . atan2 ((-100 ). Int ), 3.04192400109863 , " Str.atan2(Int)" );
225
+ is_approx(atan2 ((-0. 1 ). Str , (100 ). Int ), -0.000999999666666867 , " atan2(Str, Int)" );
217
226
}
218
227
228
+ # ?niecza skip 'Str math NYI'
219
229
{
220
230
# Str vs Str tests
221
- is_approx((-1 ). Str . atan2 ((0. 1 ). Str ), -1.47112767430373 , " Str.atan2(Str)" );
222
- is_approx(atan2 ((0.1 ). Str , (-0.1 ). Str ), 2.35619449019234 , " atan2(Str, Str)" );
231
+ is_approx((100 ). Str . atan2 ((1 ). Str ), 1.56079666010823 , " Str.atan2(Str)" );
232
+ is_approx(atan2 ((10 ). Str , (-100 ). Str ), 3.04192400109863 , " atan2(Str, Str)" );
223
233
}
224
234
235
+ # ?niecza skip 'Str math NYI'
225
236
{
226
237
# Str vs DifferentReal tests
227
- is_approx((-100 ). Str . atan2 (DifferentReal. new (-10 )), -1.67046497928606 , " Str.atan2(DifferentReal)" );
228
- is_approx(atan2 ((100 ). Str , DifferentReal. new (-10 )), 1.67046497928606 , " atan2(Str, DifferentReal)" );
238
+ is_approx((-1 ). Str . atan2 (DifferentReal. new (-0.1 )), -1.67046497928606 , " Str.atan2(DifferentReal)" );
239
+ is_approx(atan2 ((-1 ). Str , DifferentReal. new (0.1 )), -1.47112767430373 , " atan2(Str, DifferentReal)" );
229
240
}
230
241
242
+ # ?niecza skip 'DifferentReal math NYI'
231
243
{
232
244
# DifferentReal tests
233
- is_approx(DifferentReal. new (1 ). atan2 , 0.785398163397448 , " DifferentReal.atan2" );
234
- is_approx(atan2 (DifferentReal. new (-1 )), -0.785398163397448 , " atan2(DifferentReal)" );
245
+ is_approx(DifferentReal. new (0. 1 ). atan2 , 0.099668652491162 , " DifferentReal.atan2" );
246
+ is_approx(atan2 (DifferentReal. new (-10 )), -1.47112767430373 , " atan2(DifferentReal)" );
235
247
}
236
248
249
+ # ?niecza skip 'DifferentReal math NYI'
237
250
{
238
251
# DifferentReal vs Num tests
239
- is_approx(DifferentReal. new (-1 ). atan2 ((0.1 ). Num ), -1.47112767430373 , " DifferentReal.atan2(Num)" );
240
- is_approx(atan2 (DifferentReal. new (- 10 ), (100 ). Num ), - 0.099668652491162 , " atan2(DifferentReal, Num)" );
252
+ is_approx(DifferentReal. new (-1 ). atan2 ((-100 ). Num ), -3.13159298690313 , " DifferentReal.atan2(Num)" );
253
+ is_approx(atan2 (DifferentReal. new (10 ), (100 ). Num ), 0.099668652491162 , " atan2(DifferentReal, Num)" );
241
254
}
242
255
256
+ # ?niecza skip 'DifferentReal math NYI'
243
257
{
244
258
# DifferentReal vs Rat tests
245
- is_approx(DifferentReal. new (-100 ). atan2 ((-10 ). Rat (1e-9 )), -1.67046497928606 , " DifferentReal.atan2(Rat)" );
246
- is_approx(atan2 (DifferentReal. new (-100 ), (1 ). Rat (1e-9 )), -1.56079666010823 , " atan2(DifferentReal, Rat)" );
259
+ is_approx(DifferentReal. new (-0.1 ). atan2 ((-1 ). Rat (1e-9 )), -3.04192400109863 , " DifferentReal.atan2(Rat)" );
260
+ is_approx(atan2 (DifferentReal. new (0.1 ), (10 ). Rat (1e-9 )), 0.00999966668666524 , " atan2(DifferentReal, Rat)" );
247
261
}
248
262
263
+ # ?niecza skip 'DifferentReal math NYI'
249
264
{
250
265
# DifferentReal vs Int tests
251
- is_approx(DifferentReal. new (- 1 ). atan2 ((10 ). Int ), -0.099668652491162 , " DifferentReal.atan2(Int)" );
252
- is_approx(atan2 (DifferentReal. new (- 1 ), (-100 ). Int ), -3.13159298690313 , " atan2(DifferentReal, Int)" );
266
+ is_approx(DifferentReal. new (1 ). atan2 ((1 ). Int ), 0.785398163397448 , " DifferentReal.atan2(Int)" );
267
+ is_approx(atan2 (DifferentReal. new (1 ), (1 ). Int ), 0.785398163397448 , " atan2(DifferentReal, Int)" );
253
268
}
254
269
270
+ # ?niecza skip 'Str math NYI'
255
271
{
256
272
# DifferentReal vs Str tests
257
- is_approx(DifferentReal. new (1 ). atan2 ((1 ). Str ), 0.785398163397448 , " DifferentReal.atan2(Str)" );
258
- is_approx(atan2 (DifferentReal. new (-1 ), (-0.1 ). Str ), -1.67046497928606 , " atan2(DifferentReal, Str)" );
273
+ is_approx(DifferentReal. new (-100 ). atan2 ((100 ). Str ), - 0.785398163397448 , " DifferentReal.atan2(Str)" );
274
+ is_approx(atan2 (DifferentReal. new (-0. 1 ), (10 ). Str ), -0.00999966668666524 , " atan2(DifferentReal, Str)" );
259
275
}
260
276
277
+ # ?niecza skip 'DifferentReal math NYI'
261
278
{
262
279
# DifferentReal vs DifferentReal tests
263
- is_approx(DifferentReal. new (- 100 ). atan2 (DifferentReal. new (-100 )), -2.35619449019234 , " DifferentReal.atan2(DifferentReal)" );
264
- is_approx(atan2 (DifferentReal. new (10 ), DifferentReal. new (1 )), 1.47112767430373 , " atan2(DifferentReal, DifferentReal)" );
280
+ is_approx(DifferentReal. new (100 ). atan2 (DifferentReal. new (-0.1 )), 1.57179632646156 , " DifferentReal.atan2(DifferentReal)" );
281
+ is_approx(atan2 (DifferentReal. new (-100 ), DifferentReal. new (10 )), - 1.47112767430373 , " atan2(DifferentReal, DifferentReal)" );
265
282
}
266
283
267
284
done ;
0 commit comments