CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

ACos.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: ACos.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
6 #include <assert.h>
7 #include <cmath> // for acos()
8 
9 namespace Genfun {
11 
13 {}
14 
16 }
17 
18 ACos::ACos(const ACos & right) : AbsFunction(right)
19 { }
20 
21 
22 double ACos::operator() (double x) const {
23  return acos(x);
24 }
25 
26 
27 Derivative ACos::partial(unsigned int index) const {
28  assert(index==0);
29 
30  Square square;
31  Sqrt root;
32 
33  const AbsFunction & fPrime = - 1.0/root(1.0-square) ;
34  return Derivative(& fPrime);
35 }
36 
37 } // end namespace Genfun
38 
39 
virtual ~ACos()
Definition: ACos.cc:15
Derivative partial(unsigned int) const
Definition: ACos.cc:27
virtual double operator()(double argument) const
Definition: ACos.cc:22
#define FUNCTION_OBJECT_IMP(classname)