CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Tan.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: Tan.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
3// ---------------------------------------------------------------------------
4
5#include "CLHEP/GenericFunctions/Tan.hh"
6#include "CLHEP/GenericFunctions/Cos.hh"
7#include <assert.h>
8#include <cmath>
9
10namespace Genfun {
12
14{}
15
17}
18
19Tan::Tan(const Tan & right) : AbsFunction(right)
20{ }
21
22
23double Tan::operator() (double x) const {
24 return tan(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 Tan::partial(unsigned int index) const {
39 assert(index==0);
40 const AbsFunction & fPrime = 1.0/Cos()/Cos();
41 return Derivative(& fPrime);
42}
43#if defined __GNUC__
44 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
45 #pragma GCC diagnostic pop
46 #endif
47#endif
48#ifdef __clang__
49 #pragma clang diagnostic pop
50#endif
51
52} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual double operator()(double argument) const override
Definition: Tan.cc:23
Derivative partial(unsigned int) const override
Definition: Tan.cc:38
virtual ~Tan()
Definition: Tan.cc:16
Tan()
Definition: Tan.cc:13
Definition: Abs.hh:14
FunctionNoop Derivative
Definition: AbsFunction.hh:42