Lines Matching refs:derivative
37 get_type_at<RealType, sizeof...(Orders) - 1> derivative(Orders... orders) const;
82 derivative of its respective order, divided by the factorial of the order.
133 constexpr unsigned Order = 5; // Highest order derivative to be calculated.
137 std::cout << "y.derivative(" << i << ") = " << y.derivative(i) << std::endl;
142 y.derivative(0) = 16
143 y.derivative(1) = 32
144 y.derivative(2) = 48
145 y.derivative(3) = 48
146 y.derivative(4) = 24
147 y.derivative(5) = 0
153 {\tt y.derivative(0)} &=& f(2) =&& \left.x^4\right|_{x=2} &= 16\\
154 {\tt y.derivative(1)} &=& f'(2) =&& \left.4\cdot x^3\right|_{x=2} &= 32\\
155 {\tt y.derivative(2)} &=& f''(2) =&& \left.4\cdot 3\cdot x^2\right|_{x=2} &= 48\\
156 {\tt y.derivative(3)} &=& f'''(2) =&& \left.4\cdot 3\cdot2\cdot x\right|_{x=2} &= 48\\
157 {\tt y.derivative(4)} &=& f^{(4)}(2) =&& 4\cdot 3\cdot2\cdot1 &= 24\\
158 {\tt y.derivative(5)} &=& f^{(5)}(2) =&& 0 &
171 …dent `fvar` variables, with values of 11, 12, 13, and 14, for which the maximum order derivative to
173 order used when calling `v.derivative(Nw, Nx, Ny, Nz)` in the example below.
190 constexpr unsigned Nw = 3; // Max order of derivative to calculate for w
191 constexpr unsigned Nx = 2; // Max order of derivative to calculate for x
192 constexpr unsigned Ny = 4; // Max order of derivative to calculate for y
193 constexpr unsigned Nz = 3; // Max order of derivative to calculate for z
205 << "autodiff : " << v.derivative(Nw, Nx, Ny, Nz) << '\n'
207 << "relative error: " << (v.derivative(Nw, Nx, Ny, Nz) / answer - 1) << '\n';
272 std::cout << "black-scholes call price = " << call_price.derivative(0) << '\n'
273 << "black-scholes put price = " << put_price.derivative(0) << '\n'
274 << "call delta = " << call_price.derivative(1) << '\n'
275 << "put delta = " << put_price.derivative(1) << '\n'
276 << "call gamma = " << call_price.derivative(2) << '\n'
277 << "put gamma = " << put_price.derivative(2) << '\n';
300 …* Dependencies upon a derivative function for a different purpose will break when changes are made…