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