7 #define ADT_RAD Sacado::Rad::
51 botch(
const char *what,
double wanted,
double got)
55 printf(
"%s: expected %g, got %g, diff = %.2g\n", what, wanted, got, wanted-got);
63 const double tol = 5e-16;
107 #ifdef RAD_AUTO_AD_Const
142 xd = -2.; f =
asinh(-2.); dx = 0.4472135954999579;
146 if (
differ(fA.val(), f))
botch(
"fA = asinh(xAI)", f, fA.val());
147 else if (
differ(xAI.adj(),
dx))
botch(
"d asinh(xAI)/dx", dx, xAI.adj());
153 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAI)", f, fA.val());
154 else if (
differ(xcAI.adj(),
dx))
botch(
"d asinh(xcAI)/dx", dx, xcAI.adj());
159 if (
differ(fA.val(), f))
botch(
"fA = asinh(xA)", f, fA.val());
160 else if (
differ(xA.adj(),
dx))
botch(
"d asinh(xA)/dx", dx, xA.adj());
166 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcA)", f, fA.val());
167 else if (
differ(xcA.adj(),
dx))
botch(
"d asinh(xcA)/dx", dx, xcA.adj());
172 if (
differ(fA.val(), f))
botch(
"fA = asinh(xC)", f, fA.val());
173 else if (
differ(xC.adj(),
dx))
botch(
"d asinh(xC)/dx", dx, xC.adj());
179 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcC)", f, fA.val());
180 else if (
differ(xcC.adj(),
dx))
botch(
"d asinh(xcC)/dx", dx, xcC.adj());
186 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAi)", f, fA.val());
187 else if (
differ(xcAi.aval, dx))
botch(
"d asinh(xcAi)/dx", dx, xcAi.aval);
194 if (
differ(fA.val(), f))
botch(
"fA = asinh(xcAi)", f, fA.val());
195 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