7 #define ADT_RAD Sacado::Rad::
49 botch(
const char *what,
double wanted,
double got)
53 printf(
"%s: expected %g, got %g, diff = %.2g\n", what, wanted, got, wanted-got);
61 const double tol = 5e-16;
105 #ifdef RAD_AUTO_AD_Const
131 double dx, dy,
f, xd, yd;
144 xd = 3.; yd = 4.; f =
atan2(3.,4.); dx = 0.16; dy = -0.12;
149 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yAI)", f, fA.val());
150 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yAI)/dx", dx, xAI.adj());
151 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xAI,yAI)/dy", dy, yAI.adj());
156 fA =
atan2(xcAI,yAI);
158 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yAI)", f, fA.val());
159 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yAI)/dx", dx, xcAI.adj());
160 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xcAI,yAI)/dy", dy, yAI.adj());
166 fA =
atan2(xAI,ycAI);
168 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,ycAI)", f, fA.val());
169 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,ycAI)/dx", dx, xAI.adj());
170 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xAI,ycAI)/dy", dy, ycAI.adj());
176 fA =
atan2(xcAI,ycAI);
178 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,ycAI)", f, fA.val());
179 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,ycAI)/dx", dx, xcAI.adj());
180 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xcAI,ycAI)/dy", dy, ycAI.adj());
186 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yA)", f, fA.val());
187 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yA)/dx", dx, xAI.adj());
188 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xAI,yA)/dy", dy, yA.adj());
195 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yA)", f, fA.val());
196 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yA)/dx", dx, xcAI.adj());
197 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xcAI,yA)/dy", dy, yA.adj());
205 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,ycA)", f, fA.val());
206 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,ycA)/dx", dx, xAI.adj());
207 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xAI,ycA)/dy", dy, ycA.adj());
213 fA =
atan2(xcAI,ycA);
215 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,ycA)", f, fA.val());
216 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,ycA)/dx", dx, xcAI.adj());
217 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xcAI,ycA)/dy", dy, ycA.adj());
223 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yC)", f, fA.val());
224 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yC)/dx", dx, xAI.adj());
225 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xAI,yC)/dy", dy, yC.adj());
232 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yC)", f, fA.val());
233 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yC)/dx", dx, xcAI.adj());
234 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xcAI,yC)/dy", dy, yC.adj());
242 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,ycC)", f, fA.val());
243 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,ycC)/dx", dx, xAI.adj());
244 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xAI,ycC)/dy", dy, ycC.adj());
250 fA =
atan2(xcAI,ycC);
252 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,ycC)", f, fA.val());
253 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,ycC)/dx", dx, xcAI.adj());
254 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xcAI,ycC)/dy", dy, ycC.adj());
261 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yAi)", f, fA.val());
262 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yAi)/dx", dx, xAI.adj());
263 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xAI,yAi)/dy", dy, yAi.aval);
269 fA =
atan2(xcAI,yAi);
271 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yAi)", f, fA.val());
272 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yAi)/dx", dx, xcAI.adj());
273 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xcAI,yAi)/dy", dy, yAi.aval);
279 fA =
atan2(xAI,ycAi);
281 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,ycAi)", f, fA.val());
282 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,ycAi)/dx", dx, xAI.adj());
283 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xAI,ycAi)/dy", dy, ycAi.aval);
289 fA =
atan2(xcAI,ycAi);
291 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,ycAi)", f, fA.val());
292 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,ycAi)/dx", dx, xcAI.adj());
293 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xcAI,ycAi)/dy", dy, ycAi.aval);
298 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yd)", f, fA.val());
299 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yd)/dx", dx, xAI.adj());
305 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yd)", f, fA.val());
306 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yd)/dx", dx, xcAI.adj());
312 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yL)", f, fA.val());
313 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yL)/dx", dx, xAI.adj());
320 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yL)", f, fA.val());
321 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yL)/dx", dx, xcAI.adj());
327 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAI,yi)", f, fA.val());
328 else if (
differ(xAI.adj(),
dx))
botch(
"d atan2(xAI,yi)/dx", dx, xAI.adj());
335 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAI,yi)", f, fA.val());
336 else if (
differ(xcAI.adj(),
dx))
botch(
"d atan2(xcAI,yi)/dx", dx, xcAI.adj());
342 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yAI)", f, fA.val());
343 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yAI)/dx", dx, xA.adj());
344 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xA,yAI)/dy", dy, yAI.adj());
351 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yAI)", f, fA.val());
352 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yAI)/dx", dx, xcA.adj());
353 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xcA,yAI)/dy", dy, yAI.adj());
361 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,ycAI)", f, fA.val());
362 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,ycAI)/dx", dx, xA.adj());
363 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xA,ycAI)/dy", dy, ycAI.adj());
369 fA =
atan2(xcA,ycAI);
371 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,ycAI)", f, fA.val());
372 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,ycAI)/dx", dx, xcA.adj());
373 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xcA,ycAI)/dy", dy, ycAI.adj());
379 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yA)", f, fA.val());
380 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yA)/dx", dx, xA.adj());
381 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xA,yA)/dy", dy, yA.adj());
388 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yA)", f, fA.val());
389 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yA)/dx", dx, xcA.adj());
390 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xcA,yA)/dy", dy, yA.adj());
398 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,ycA)", f, fA.val());
399 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,ycA)/dx", dx, xA.adj());
400 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xA,ycA)/dy", dy, ycA.adj());
408 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,ycA)", f, fA.val());
409 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,ycA)/dx", dx, xcA.adj());
410 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xcA,ycA)/dy", dy, ycA.adj());
416 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yC)", f, fA.val());
417 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yC)/dx", dx, xA.adj());
418 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xA,yC)/dy", dy, yC.adj());
425 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yC)", f, fA.val());
426 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yC)/dx", dx, xcA.adj());
427 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xcA,yC)/dy", dy, yC.adj());
435 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,ycC)", f, fA.val());
436 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,ycC)/dx", dx, xA.adj());
437 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xA,ycC)/dy", dy, ycC.adj());
445 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,ycC)", f, fA.val());
446 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,ycC)/dx", dx, xcA.adj());
447 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xcA,ycC)/dy", dy, ycC.adj());
454 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yAi)", f, fA.val());
455 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yAi)/dx", dx, xA.adj());
456 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xA,yAi)/dy", dy, yAi.aval);
464 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yAi)", f, fA.val());
465 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yAi)/dx", dx, xcA.adj());
466 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xcA,yAi)/dy", dy, yAi.aval);
474 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,ycAi)", f, fA.val());
475 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,ycAi)/dx", dx, xA.adj());
476 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xA,ycAi)/dy", dy, ycAi.aval);
482 fA =
atan2(xcA,ycAi);
484 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,ycAi)", f, fA.val());
485 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,ycAi)/dx", dx, xcA.adj());
486 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xcA,ycAi)/dy", dy, ycAi.aval);
491 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yd)", f, fA.val());
492 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yd)/dx", dx, xA.adj());
498 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yd)", f, fA.val());
499 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yd)/dx", dx, xcA.adj());
505 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yL)", f, fA.val());
506 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yL)/dx", dx, xA.adj());
513 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yL)", f, fA.val());
514 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yL)/dx", dx, xcA.adj());
520 if (
differ(fA.val(), f))
botch(
"fA = atan2(xA,yi)", f, fA.val());
521 else if (
differ(xA.adj(),
dx))
botch(
"d atan2(xA,yi)/dx", dx, xA.adj());
528 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcA,yi)", f, fA.val());
529 else if (
differ(xcA.adj(),
dx))
botch(
"d atan2(xcA,yi)/dx", dx, xcA.adj());
535 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yAI)", f, fA.val());
536 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yAI)/dx", dx, xC.adj());
537 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xC,yAI)/dy", dy, yAI.adj());
544 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yAI)", f, fA.val());
545 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yAI)/dx", dx, xcC.adj());
546 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xcC,yAI)/dy", dy, yAI.adj());
554 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,ycAI)", f, fA.val());
555 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,ycAI)/dx", dx, xC.adj());
556 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xC,ycAI)/dy", dy, ycAI.adj());
562 fA =
atan2(xcC,ycAI);
564 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,ycAI)", f, fA.val());
565 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,ycAI)/dx", dx, xcC.adj());
566 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xcC,ycAI)/dy", dy, ycAI.adj());
572 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yA)", f, fA.val());
573 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yA)/dx", dx, xC.adj());
574 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xC,yA)/dy", dy, yA.adj());
581 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yA)", f, fA.val());
582 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yA)/dx", dx, xcC.adj());
583 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xcC,yA)/dy", dy, yA.adj());
591 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,ycA)", f, fA.val());
592 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,ycA)/dx", dx, xC.adj());
593 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xC,ycA)/dy", dy, ycA.adj());
601 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,ycA)", f, fA.val());
602 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,ycA)/dx", dx, xcC.adj());
603 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xcC,ycA)/dy", dy, ycA.adj());
609 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yC)", f, fA.val());
610 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yC)/dx", dx, xC.adj());
611 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xC,yC)/dy", dy, yC.adj());
618 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yC)", f, fA.val());
619 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yC)/dx", dx, xcC.adj());
620 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xcC,yC)/dy", dy, yC.adj());
628 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,ycC)", f, fA.val());
629 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,ycC)/dx", dx, xC.adj());
630 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xC,ycC)/dy", dy, ycC.adj());
638 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,ycC)", f, fA.val());
639 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,ycC)/dx", dx, xcC.adj());
640 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xcC,ycC)/dy", dy, ycC.adj());
647 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yAi)", f, fA.val());
648 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yAi)/dx", dx, xC.adj());
649 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xC,yAi)/dy", dy, yAi.aval);
657 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yAi)", f, fA.val());
658 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yAi)/dx", dx, xcC.adj());
659 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xcC,yAi)/dy", dy, yAi.aval);
667 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,ycAi)", f, fA.val());
668 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,ycAi)/dx", dx, xC.adj());
669 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xC,ycAi)/dy", dy, ycAi.aval);
675 fA =
atan2(xcC,ycAi);
677 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,ycAi)", f, fA.val());
678 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,ycAi)/dx", dx, xcC.adj());
679 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xcC,ycAi)/dy", dy, ycAi.aval);
684 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yd)", f, fA.val());
685 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yd)/dx", dx, xC.adj());
691 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yd)", f, fA.val());
692 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yd)/dx", dx, xcC.adj());
698 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yL)", f, fA.val());
699 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yL)/dx", dx, xC.adj());
706 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yL)", f, fA.val());
707 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yL)/dx", dx, xcC.adj());
713 if (
differ(fA.val(), f))
botch(
"fA = atan2(xC,yi)", f, fA.val());
714 else if (
differ(xC.adj(),
dx))
botch(
"d atan2(xC,yi)/dx", dx, xC.adj());
721 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcC,yi)", f, fA.val());
722 else if (
differ(xcC.adj(),
dx))
botch(
"d atan2(xcC,yi)/dx", dx, xcC.adj());
729 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yAI)", f, fA.val());
730 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yAI)/dx", dx, xAi.aval);
731 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xAi,yAI)/dy", dy, yAI.adj());
737 fA =
atan2(xcAi,yAI);
739 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yAI)", f, fA.val());
740 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yAI)/dx", dx, xcAi.aval);
741 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xcAi,yAI)/dy", dy, yAI.adj());
747 fA =
atan2(xAi,ycAI);
749 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,ycAI)", f, fA.val());
750 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,ycAI)/dx", dx, xAi.aval);
751 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xAi,ycAI)/dy", dy, ycAI.adj());
758 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yA)", f, fA.val());
759 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yA)/dx", dx, xAi.aval);
760 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xAi,yA)/dy", dy, yA.adj());
768 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yA)", f, fA.val());
769 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yA)/dx", dx, xcAi.aval);
770 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xcAi,yA)/dy", dy, yA.adj());
778 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,ycA)", f, fA.val());
779 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,ycA)/dx", dx, xAi.aval);
780 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xAi,ycA)/dy", dy, ycA.adj());
787 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yC)", f, fA.val());
788 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yC)/dx", dx, xAi.aval);
789 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xAi,yC)/dy", dy, yC.adj());
797 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yC)", f, fA.val());
798 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yC)/dx", dx, xcAi.aval);
799 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xcAi,yC)/dy", dy, yC.adj());
807 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,ycC)", f, fA.val());
808 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,ycC)/dx", dx, xAi.aval);
809 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xAi,ycC)/dy", dy, ycC.adj());
816 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yAi)", f, fA.val());
817 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yAi)/dx", dx, xAi.aval);
818 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xAi,yAi)/dy", dy, yAi.aval);
824 fA =
atan2(xcAi,yAi);
826 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yAi)", f, fA.val());
827 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yAi)/dx", dx, xcAi.aval);
828 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xcAi,yAi)/dy", dy, yAi.aval);
834 fA =
atan2(xAi,ycAi);
836 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,ycAi)", f, fA.val());
837 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,ycAi)/dx", dx, xAi.aval);
838 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xAi,ycAi)/dy", dy, ycAi.aval);
844 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yd)", f, fA.val());
845 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yd)/dx", dx, xAi.aval);
852 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yd)", f, fA.val());
853 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yd)/dx", dx, xcAi.aval);
860 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yL)", f, fA.val());
861 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yL)/dx", dx, xAi.aval);
869 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yL)", f, fA.val());
870 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yL)/dx", dx, xcAi.aval);
877 if (
differ(fA.val(), f))
botch(
"fA = atan2(xAi,yi)", f, fA.val());
878 else if (
differ(xAi.aval, dx))
botch(
"d atan2(xAi,yi)/dx", dx, xAi.aval);
886 if (
differ(fA.val(), f))
botch(
"fA = atan2(xcAi,yi)", f, fA.val());
887 else if (
differ(xcAi.aval, dx))
botch(
"d atan2(xcAi,yi)/dx", dx, xcAi.aval);
892 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,yAI)", f, fA.val());
893 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xd,yAI)/dy", dy, yAI.adj());
899 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,ycAI)", f, fA.val());
900 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xd,ycAI)/dy", dy, ycAI.adj());
905 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,yA)", f, fA.val());
906 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xd,yA)/dy", dy, yA.adj());
912 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,ycA)", f, fA.val());
913 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xd,ycA)/dy", dy, ycA.adj());
918 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,yC)", f, fA.val());
919 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xd,yC)/dy", dy, yC.adj());
925 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,ycC)", f, fA.val());
926 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xd,ycC)/dy", dy, ycC.adj());
932 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,yAi)", f, fA.val());
933 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xd,yAi)/dy", dy, yAi.aval);
940 if (
differ(fA.val(), f))
botch(
"fA = atan2(xd,ycAi)", f, fA.val());
941 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xd,ycAi)/dy", dy, ycAi.aval);
947 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,yAI)", f, fA.val());
948 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xL,yAI)/dy", dy, yAI.adj());
955 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,ycAI)", f, fA.val());
956 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xL,ycAI)/dy", dy, ycAI.adj());
962 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,yA)", f, fA.val());
963 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xL,yA)/dy", dy, yA.adj());
970 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,ycA)", f, fA.val());
971 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xL,ycA)/dy", dy, ycA.adj());
977 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,yC)", f, fA.val());
978 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xL,yC)/dy", dy, yC.adj());
985 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,ycC)", f, fA.val());
986 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xL,ycC)/dy", dy, ycC.adj());
993 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,yAi)", f, fA.val());
994 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xL,yAi)/dy", dy, yAi.aval);
1000 fA =
atan2(xL,ycAi);
1002 if (
differ(fA.val(), f))
botch(
"fA = atan2(xL,ycAi)", f, fA.val());
1003 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xL,ycAi)/dy", dy, ycAi.aval);
1009 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,yAI)", f, fA.val());
1010 else if (
differ(yAI.adj(), dy))
botch(
"d atan2(xi,yAI)/dy", dy, yAI.adj());
1015 fA =
atan2(xi,ycAI);
1017 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,ycAI)", f, fA.val());
1018 else if (
differ(ycAI.adj(), dy))
botch(
"d atan2(xi,ycAI)/dy", dy, ycAI.adj());
1024 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,yA)", f, fA.val());
1025 else if (
differ(yA.adj(), dy))
botch(
"d atan2(xi,yA)/dy", dy, yA.adj());
1032 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,ycA)", f, fA.val());
1033 else if (
differ(ycA.adj(), dy))
botch(
"d atan2(xi,ycA)/dy", dy, ycA.adj());
1039 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,yC)", f, fA.val());
1040 else if (
differ(yC.adj(), dy))
botch(
"d atan2(xi,yC)/dy", dy, yC.adj());
1047 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,ycC)", f, fA.val());
1048 else if (
differ(ycC.adj(), dy))
botch(
"d atan2(xi,ycC)/dy", dy, ycC.adj());
1055 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,yAi)", f, fA.val());
1056 else if (
differ(yAi.aval, dy))
botch(
"d atan2(xi,yAi)/dy", dy, yAi.aval);
1062 fA =
atan2(xi,ycAi);
1064 if (
differ(fA.val(), f))
botch(
"fA = atan2(xi,ycAi)", f, fA.val());
1065 else if (
differ(ycAi.aval, dy))
botch(
"d atan2(xi,ycAi)/dy", dy, ycAi.aval);
ADT_RAD ADvari< double > Ai
int botch(ExpectedAnswer *e, const char *partial, double got, double wanted)
ADT_RAD IndepADvar< double > AI
const ADT_RAD IndepADvar< double > cAI
const ADT_RAD ADvari< double > cAi
static int differ(double a, double b)
atan2(expr1.val(), expr2.val())
const ADT_RAD ConstADvar< double > cC
const ADT_RAD ADvar< double > cA