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