| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Namespaces | Functions
IntegralInTest.cpp File Reference

Test file for the class NumericalIndefiniteIntregral. More...

`#include <math.h>`
`#include <stdio.h>`
`#include "GaudiMath/GaudiMath.h"`
`#include "GaudiKernel/SystemOfUnits.h"`
`#include "CLHEP/GenericFunctions/Sin.hh"`
`#include "CLHEP/GenericFunctions/Cos.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 33 of file IntegralInTest.cpp.

34 {
35
36 std::cout <<
37 " Test for numerical differentiation of Genfun::Cos(x) " << std::endl ;
38
39 const GaudiMath::IndIntegral& mysin =
40 GaudiMath::IndIntegral( Genfun::Cos() , 0 , 0.0 ) ;
41
42 for( double x = -90 * Gaudi::Units::degree ;
43 x <= 180 * Gaudi::Units::degree ;
44 x += 10 * Gaudi::Units::degree ) {
45 double value = mysin ( x ) ;
46 double error = mysin.error() ;
47 printf( "x=%8.3f deg; I(Cos)=%+.19f; ActErr=%+.19f; EstErr=%+.19f;\n",
48 x / Gaudi::Units::degree , value , value-sin(x) , error );
49 }
50
51 exit(0);
52 }
Gaudi::Units::degree
constexpr double degree
Definition: SystemOfUnits.h:108
std::endl
T endl(T...args)
Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral::error
double error() const
evaluate of previous error
Definition: NumericalIndefiniteIntegral.h:314
std::sin
T sin(T...args)
std::exit
T exit(T...args)
GaudiMath::IndIntegral
Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral IndIntegral
Definition: GaudiMath.h:33
Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral
The simple class for numerical integrations.
Definition: NumericalIndefiniteIntegral.h:83
std::printf
T printf(T...args)
std::cout