21 #ifndef RFFGEN_CMATH_EXP_HH
22 #define RFFGEN_CMATH_EXP_HH
25 #include "../Util/base.hh"
26 #include "../Util/chainer.hh"
42 using Chainer<Exp>::operator ();
56 double d0() const noexcept
63 double d1(
double dx = 1.)
const
69 template <
int = -1 ,
int = -1 >
70 double d2(
double dx = 1.,
double dy = 1.)
const
76 template <
int = -1 ,
int = -1 ,
int = -1 >
77 double d3(
double dx = 1.,
double dy = 1.,
double dz = 1.)
const
79 return e_x * dx * dy * dz;
96 using Chainer<Exp2>::operator ();
110 double d0() const noexcept
116 template <
int = -1 >
117 double d1(
double dx = 1.)
const
119 return value * ln2 * dx;
123 template <
int = -1 ,
int = -1 >
124 double d2(
double dx = 1.,
double dy = 1.)
const
126 return value * ln2 * ln2 * dx * dy;
130 template <
int = -1 ,
int = -1 ,
int = -1 >
131 double d3(
double dx = 1.,
double dy = 1.,
double dz = 1.)
const
133 return value * ln2 * ln2 * ln2 * dx * dy * dz;
137 double value = 1., ln2 = log(2.);
144 template <class Function, class = std::enable_if_t<std::is_base_of<Base,Function>::value> >
145 auto exp(
const Function& f)
154 template <class Function, class = std::enable_if_t<std::is_base_of<Base,Function>::value> >
155 auto ex2p(
const Function& f)
162 #endif // RFFGEN_CMATH_EXP_HH
double d3(double dx=1., double dy=1., double dz=1.) const
Third (directional) derivative.
Definition: exp.hh:131
Function including first three derivatives.
Definition: exp.hh:94
void update(double x)
Reset point of evaluation.
Definition: exp.hh:104
double d1(double dx=1.) const
First (directional) derivative.
Definition: exp.hh:117
Base class for functions satisfying FunctionConcept. Required for enabling the operators in generate...
Definition: base.hh:27
Exp2(double x=0.)
Constructor.
Definition: exp.hh:101
double d0() const noexcept
Function value.
Definition: exp.hh:56
Exponential function including first three derivatives.
Definition: exp.hh:40
double d2(double dx=1., double dy=1.) const
Second (directinal) derivative.
Definition: exp.hh:70
Exp(double x=0.)
Constructor.
Definition: exp.hh:47
double d3(double dx=1., double dy=1., double dz=1.) const
Third (directional) derivative.
Definition: exp.hh:77
double d1(double dx=1.) const
First (directional) derivative.
Definition: exp.hh:63
void update(double x)
Reset point of evaluation.
Definition: exp.hh:50
double d0() const noexcept
Function value.
Definition: exp.hh:110
double d2(double dx=1., double dy=1.) const
Second (directinal) derivative.
Definition: exp.hh:124