CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: ACos.cc,v 1.4 2003/10/10 17:40:39 garren Exp $ 00003 #include "CLHEP/GenericFunctions/ACos.hh" 00004 #include "CLHEP/GenericFunctions/Sqrt.hh" 00005 #include "CLHEP/GenericFunctions/Square.hh" 00006 #include <assert.h> 00007 #include <cmath> // for acos() 00008 00009 namespace Genfun { 00010 FUNCTION_OBJECT_IMP(ACos) 00011 00012 ACos::ACos() 00013 {} 00014 00015 ACos::~ACos() { 00016 } 00017 00018 ACos::ACos(const ACos & right) 00019 { } 00020 00021 00022 double ACos::operator() (double x) const { 00023 return acos(x); 00024 } 00025 00026 00027 Derivative ACos::partial(unsigned int index) const { 00028 assert(index==0); 00029 00030 Square square; 00031 Sqrt root; 00032 00033 const AbsFunction & fPrime = - 1.0/root(1.0-square) ; 00034 return Derivative(& fPrime); 00035 } 00036 00037 } // end namespace Genfun 00038 00039