25 double sum(
double x,
double y,
double z ) {
return 3 * x * x - 5 * y * y + 3 * z * z; }
30 Genfun::Argument arg( 3 );
33 format +=
" sum=%+.10f sum-mysum=%+.10f \n";
35 for (
double x = 0; x < 3; ++x ) {
36 for (
double y = 0; y < 3; ++y ) {
37 for (
double z = 0; z < 3; ++z ) {
41 printf( format.
c_str(), x, y, z, mysum( arg ),
sum( x, y, z ),
sum( x, y, z ) - mysum( arg ) );
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
double sum(double x, double y, double z)
Genfun::AbsFunction Function
GAUDI_API AIDAFunction adapter(const AIDA::IFunction &function)