The Gaudi Framework  v30r3 (a5ef0a68)
IntegralInTest.cpp File Reference

Test file for the class NumericalIndefiniteIntregral. More...

#include <cmath>
#include <cstdio>
#include "GaudiKernel/SystemOfUnits.h"
#include "GaudiMath/GaudiMath.h"
#include "CLHEP/GenericFunctions/Cos.hh"
#include "CLHEP/GenericFunctions/Sin.hh"
Include dependency graph for IntegralInTest.cpp:

Go to the source code of this file.

Namespaces

 CLHEP
 

Functions

int main ()
 

Detailed Description

Test file for the class NumericalIndefiniteIntregral.

Date
2003-08-31
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Definition in file IntegralInTest.cpp.

Function Documentation

int main ( )

Definition at line 35 of file IntegralInTest.cpp.

36 {
37 
38  std::cout << " Test for numerical differentiation of Genfun::Cos(x) " << std::endl;
39 
40  const GaudiMath::IndIntegral& mysin = GaudiMath::IndIntegral( Genfun::Cos(), 0, 0.0 );
41 
42  for ( double x = -90 * Gaudi::Units::degree; x <= 180 * Gaudi::Units::degree; x += 10 * Gaudi::Units::degree ) {
43  double value = mysin( x );
44  double error = mysin.error();
45  printf( "x=%8.3f deg; I(Cos)=%+.19f; ActErr=%+.19f; EstErr=%+.19f;\n", x / Gaudi::Units::degree, value,
46  value - sin( x ), error );
47  }
48 }
constexpr double degree
T endl(T...args)
T sin(T...args)
Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral IndIntegral
Definition: GaudiMath.h:29
T printf(T...args)