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