Automatic Differentiation
 
Loading...
Searching...
No Matches
modified_bessel_second_kind.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_FWD_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
2#define STAN_MATH_FWD_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
3
7
8namespace stan {
9namespace math {
10
11template <typename T>
13 T modified_bessel_second_kind_z(modified_bessel_second_kind(v, z.val_));
14 return fvar<T>(modified_bessel_second_kind_z,
15 -v * z.d_ * modified_bessel_second_kind_z / z.val_
16 - z.d_ * modified_bessel_second_kind(v - 1, z.val_));
17}
18} // namespace math
19} // namespace stan
20#endif
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Scalar val_
The value of this variable.
Definition fvar.hpp:49
Scalar d_
The tangent (derivative) of this variable.
Definition fvar.hpp:61
This template class represents scalars used in forward-mode automatic differentiation,...
Definition fvar.hpp:40