Lines Matching refs:derivative
80 …''(x_0)$, $f'''(x_0)$, ... within the coefficients. Each coefficient is equal to the derivative of
131 constexpr unsigned Order = 5; // Highest order derivative to be calculated.
135 std::cout << "y.derivative(" << i << ") = " << y.derivative(i) << std::endl;
140 y.derivative(0) = 16
141 y.derivative(1) = 32
142 y.derivative(2) = 48
143 y.derivative(3) = 48
144 y.derivative(4) = 24
145 y.derivative(5) = 0
151 {\tt y.derivative(0)} &=& f(2) =&& \left.x^4\right|_{x=2} &= 16\\
152 {\tt y.derivative(1)} &=& f'(2) =&& \left.4\cdot x^3\right|_{x=2} &= 32\\
153 {\tt y.derivative(2)} &=& f''(2) =&& \left.4\cdot 3\cdot x^2\right|_{x=2} &= 48\\
154 {\tt y.derivative(3)} &=& f'''(2) =&& \left.4\cdot 3\cdot2\cdot x\right|_{x=2} &= 48\\
155 {\tt y.derivative(4)} &=& f^{(4)}(2) =&& 4\cdot 3\cdot2\cdot1 &= 24\\
156 {\tt y.derivative(5)} &=& f^{(5)}(2) =&& 0 &
165 … {\tt fvar} variables, with values of 11, 12, 13, and 14, for which the maximum order derivative to
167 order used when calling {\tt v.derivative(Nw, Nx, Ny, Nz)} in the example below.
185 constexpr unsigned Nw = 3; // Max order of derivative to calculate for w
186 constexpr unsigned Nx = 2; // Max order of derivative to calculate for x
187 constexpr unsigned Ny = 4; // Max order of derivative to calculate for y
188 constexpr unsigned Nz = 3; // Max order of derivative to calculate for z
200 << "autodiff : " << v.derivative(Nw, Nx, Ny, Nz) << '\n'
202 << "relative error: " << (v.derivative(Nw, Nx, Ny, Nz) / answer - 1) << '\n';
267 std::cout << "black-scholes call price = " << call_price.derivative(0) << '\n'
268 << "black-scholes put price = " << put_price.derivative(0) << '\n'
269 << "call delta = " << call_price.derivative(1) << '\n'
270 << "put delta = " << put_price.derivative(1) << '\n'
271 << "call gamma = " << call_price.derivative(2) << '\n'
272 << "put gamma = " << put_price.derivative(2) << '\n';
296 …\item Dependencies upon a derivative function for a different purpose will break when changes are …
454 approximate $e^x$ when $0<x<1$. This would mean that the \nth{15} derivative, and all higher order …
539 %\item The maximum derivative order $M$ that is to be calculated with respect to $x$.
577 % std::cout << "y.derivative("<<n<<") == " << y.derivative(n) << std::endl;
579 %{\tt y.derivative(0)} returns the undifferentiated value $f(x_0)$, and {\tt y.derivative(n)} retur…
585 %\item {\tt y.derivative(0)}
611 %The object {\tt z} holds a 2-dimensional array, thus {\tt derivative(...)} is a 2-parameter method:
614 %{\tt z.derivative(i,j)} = \frac{\partial^{i+j}f}{\partial x^i\partial y^j}(13,14)
620 % z.derivative(2,0) == 20
621 % z.derivative(1,1) == 50
622 % z.derivative(0,2) == 200
624 %Note how the position of the parameters in {\tt derivative(...)} match how {\tt x} and {\tt y} wer…
633 % and calls to {\tt derivative(...)}.
634 %\item The last template position in {\tt make\_fvar<T,...>} determines which variable a derivative…
639 %only by the C++ compiler/memory/platform. The maximum derivative order of each variable is {\tt Nx…
644 %{\tt w.derivative(nx,ny,nz)} =
665 % std::cout << "w.derivative("<<nx<<','<<ny<<','<<nz<<") == "
666 % << w.derivative(nx,ny,nz) << std::endl;
669 %$x, y,$ or $z$ a derivative is taken with respect to. In terms of the $\varepsilon$-polynomials
698 % std::cout << "w.derivative("<<nx<<','<<ny<<','<<nz<<") == "
699 % << w.derivative(nx,ny,nz) << std::endl;
744 << "y.derivative(10) = " << y.derivative(10) << std::endl;
749 y.derivative(10) = -3628800
753 For example, the \nth{10} derivative has the form
835 \item The highest order derivative to be calculated.
836 \item A function that maps derivative order to derivative value.
838 The highest order derivative necessary to be calculated is generally equal to {\tt fvar::order\_sum…
840 4 values into an array, and take the derivative order modulo 4 as the index into this array.
844 The relationship between a coefficient $C_n$ and derivative $D_n$ for derivative order $n$ is
940 …is is again consistent with Section~\ref{compatibility}, and returns correct non-derivative values,
941 it returns a constant when {\tt x==0} thereby losing all derivative information contained in {\tt x…
942 contributions from $\sinc$. For example, $\sinc''(0)=-\frac{1}{3}$, however {\tt y.derivative(2) ==…