CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
ASin.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: ASin.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
3#include "CLHEP/GenericFunctions/AbsFunction.hh"
4#include "CLHEP/GenericFunctions/ASin.hh"
5#include "CLHEP/GenericFunctions/Sqrt.hh"
6#include "CLHEP/GenericFunctions/Square.hh"
7#include <assert.h>
8#include <cmath> // for asin()
9
10namespace Genfun {
12
14{}
15
17}
18
19ASin::ASin(const ASin & right) : AbsFunction(right)
20{ }
21
22
23double ASin::operator() (double x) const {
24 return asin(x);
25}
26
27// don't generate warnings about unused parameter inside assert
28#if defined __GNUC__
29 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wunused-parameter"
32 #endif
33#endif
34#ifdef __clang__
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wunused-parameter"
37#endif
38Derivative ASin::partial(unsigned int index) const {
39 assert(index==0);
40
41 Square square;
42 Sqrt root;
43
44 const AbsFunction & fPrime = 1.0/root(1.0-square) ;
45 return Derivative(& fPrime);
46}
47#if defined __GNUC__
48 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
49 #pragma GCC diagnostic pop
50 #endif
51#endif
52#ifdef __clang__
53 #pragma clang diagnostic pop
54#endif
55
56} // end namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
Derivative partial(unsigned int) const override
Definition: ASin.cc:38
virtual ~ASin()
Definition: ASin.cc:16
virtual double operator()(double argument) const override
Definition: ASin.cc:23
Definition: Abs.hh:14
FunctionNoop Derivative
Definition: AbsFunction.hh:42