14 #define ADT_RAD Sacado::Rad::
58 botch(
const char *what,
double wanted,
double got)
62 printf(
"%s: expected %g, got %g, diff = %.2g\n", what, wanted, got, wanted-got);
70 const double tol = 5e-16;
114 #ifdef RAD_AUTO_AD_Const
149 xd = -2.; f =
asinh(-2.); dx = 0.4472135954999579;
153 if (
differ(fA.val(), f))
botch(
"fA = asinh(xAI)", f, fA.val());
154 else if (
differ(xAI.adj(),
dx))
botch(
"d asinh(xAI)/dx", dx, xAI.adj());
160 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAI)", f, fA.val());
161 else if (
differ(xcAI.adj(),
dx))
botch(
"d asinh(xcAI)/dx", dx, xcAI.adj());
166 if (
differ(fA.val(), f))
botch(
"fA = asinh(xA)", f, fA.val());
167 else if (
differ(xA.adj(),
dx))
botch(
"d asinh(xA)/dx", dx, xA.adj());
173 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcA)", f, fA.val());
174 else if (
differ(xcA.adj(),
dx))
botch(
"d asinh(xcA)/dx", dx, xcA.adj());
179 if (
differ(fA.val(), f))
botch(
"fA = asinh(xC)", f, fA.val());
180 else if (
differ(xC.adj(),
dx))
botch(
"d asinh(xC)/dx", dx, xC.adj());
186 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcC)", f, fA.val());
187 else if (
differ(xcC.adj(),
dx))
botch(
"d asinh(xcC)/dx", dx, xcC.adj());
193 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAi)", f, fA.val());
194 else if (
differ(xcAi.aval, dx))
botch(
"d asinh(xcAi)/dx", dx, xcAi.aval);
201 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAi)", f, fA.val());
202 else if (
differ(xcAi.aval, dx))
botch(
"d asinh(xcAi)/dx", dx, xcAi.aval);
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)
const ADT_RAD ConstADvar< double > cC
const ADT_RAD ADvar< double > cA