Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bessel_second_kind.hpp
Go to the documentation of this file.
1 #ifndef STAN__AGRAD__FWD__FUNCTIONS__BESSEL_SECOND_KIND_HPP
2 #define STAN__AGRAD__FWD__FUNCTIONS__BESSEL_SECOND_KIND_HPP
3 
5 #include <stan/meta/traits.hpp>
7 
8 namespace stan {
9 
10  namespace agrad {
11 
12  template <typename T>
13  inline
14  fvar<T>
15  bessel_second_kind(int v, const fvar<T>& z) {
17 
18  T bessel_second_kind_z(bessel_second_kind(v, z.val_));
19  return fvar<T>(bessel_second_kind_z,
20  v * z.d_ * bessel_second_kind_z / z.val_
21  - z.d_ * bessel_second_kind(v + 1,z.val_));
22  }
23  }
24 }
25 #endif
T2 bessel_second_kind(const int v, const T2 z)
fvar< T > bessel_second_kind(int v, const fvar< T > &z)

     [ Stan Home Page ] © 2011–2014, Stan Development Team.