Prev Next RevSinCos

Reverse Mode Sine and Cosine Functions

Syntax
inline void RevTypeSinCos(size_t d,
     const 
Base *s, const Base *c, const Base *x,
      
Base *psBase *pcBase *px)

Description
We are given the partial derivatives for a function  G(s, c, x) and we wish to compute the partial derivatives for the function  \[
     H(x) = G [ S(x) , C(x) , x ]
\]
where  S(x) and  C(x) are defined as the d-th order Taylor coefficient matrix for sine and cosine as a function of the corresponding matrix for X; i.e.,
Type  S  C
Trig  \sin [ X(t) ]  \cos [ X(t) ]
Hyp  \sinh[  X(t) ]  \cosh [ X(t) ]
Note that S and  C have been used both the original functions and for the corresponding mapping of Taylor coefficients.

x
The vector x has length  d+1 and contains the d-th order Taylor coefficient matrix for X.

s
The vector s has length  d+1 and contains d-th order Taylor coefficient matrix for S.

c
The vector c has length  d+1 and contains d-th order Taylor coefficient matrix for C.

On Input

px
The vector px has length  d+1 and px[j] contains the partial for G with respect to the j-th order Taylor coefficient for X.

ps
The vector ps has length  d+1 and ps[j] contains the partial for G with respect to the j-th order Taylor coefficient for S.

pc
The vector pc has length  d+1 and pc[j] contains the partial for G with respect to the j-th order Taylor coefficient for C.

On Output

px
The vector px has length  d+1 and px[j] contains the partial for H with respect to the j-th order Taylor coefficient for X.

ps
The vector ps has length  d+1 and its contents are no longer specified; i.e., it has been used for work space.

pc
The vector pc has length  d+1 and its contents are no longer specified; i.e., it has been used for work space.
Input File: cppad/local/sin_cos.hpp