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 = 1.25; f =
acosh(1.25); dx = 1.3333333333333333;
153 if (
differ(fA.val(), f))
botch(
"fA = acosh(xAI)", f, fA.val());
154 else if (
differ(xAI.adj(),
dx))
botch(
"d acosh(xAI)/dx", dx, xAI.adj());
160 if (
differ(fA.val(), f))
botch(
"fA = acosh(xcAI)", f, fA.val());
161 else if (
differ(xcAI.adj(),
dx))
botch(
"d acosh(xcAI)/dx", dx, xcAI.adj());
166 if (
differ(fA.val(), f))
botch(
"fA = acosh(xA)", f, fA.val());
167 else if (
differ(xA.adj(),
dx))
botch(
"d acosh(xA)/dx", dx, xA.adj());
173 if (
differ(fA.val(), f))
botch(
"fA = acosh(xcA)", f, fA.val());
174 else if (
differ(xcA.adj(),
dx))
botch(
"d acosh(xcA)/dx", dx, xcA.adj());
179 if (
differ(fA.val(), f))
botch(
"fA = acosh(xC)", f, fA.val());
180 else if (
differ(xC.adj(),
dx))
botch(
"d acosh(xC)/dx", dx, xC.adj());
186 if (
differ(fA.val(), f))
botch(
"fA = acosh(xcC)", f, fA.val());
187 else if (
differ(xcC.adj(),
dx))
botch(
"d acosh(xcC)/dx", dx, xcC.adj());
193 if (
differ(fA.val(), f))
botch(
"fA = acosh(xcAi)", f, fA.val());
194 else if (
differ(xcAi.aval, dx))
botch(
"d acosh(xcAi)/dx", dx, xcAi.aval);
201 if (
differ(fA.val(), f))
botch(
"fA = acosh(xcAi)", f, fA.val());
202 else if (
differ(xcAi.aval, dx))
botch(
"d acosh(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