1 #ifndef PhysicsTools_Utilities_Derivative_h 2 #define PhysicsTools_Utilities_Derivative_h 12 template <
typename X,
typename A>
44 (num<1>() /
sqr(
cos(
_._))) * derivative<X>(
_._));
56 derivative<X>(
_._1) *
_._2 +
_._1 * derivative<X>(
_._2));
62 (derivative<X>(
_._1) *
_._2 -
_._1 * derivative<X>(
_._2)) /
sqr(
_._2));
68 _._2*
pow(
_._1, num<n - 1>()) * derivative<X>(
_._1));
74 _._2*
pow(
_._1, fract<n - m, m>()) * derivative<X>(
_._1));
80 (fract<1, 2>() * (num<1>() /
sqrt(
_._))) * derivative<X>(
_._));
const Numerical< n > & num()
#define DERIV_RULE(TMPL, T, RES, COMB)
typedef POWER(A, NUM(n)) arg
Derivative< X, A >::type derivative(const A &_)
Sin< T >::type sin(const T &t)
static type get(const A &_)
TEMPL(T2) struct Divides B
Sqrt< T >::type sqrt(const T &t)
Cos< T >::type cos(const T &t)
Sgn< T >::type sgn(const T &t)
TEMPL(T1) struct Divides0
typedef PROD(F, SUM(RATIO(A, F), RATIO(B, F))) type
Square< F >::type sqr(const F &f)
typedef DIFF(PROD(A, B1), PRIMIT(X, PROD(A1, B1))) type
Power< A, B >::type pow(const A &a, const B &b)