Automatic Differentiation
 
Loading...
Searching...
No Matches
bessel_second_kind.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_BESSEL_SECOND_KIND_HPP
2#define STAN_MATH_PRIM_FUN_BESSEL_SECOND_KIND_HPP
3
6#include <boost/math/special_functions/bessel.hpp>
7
8namespace stan {
9namespace math {
10
40template <typename T2, require_arithmetic_t<T2>* = nullptr>
41inline T2 bessel_second_kind(int v, const T2 z) {
42 return boost::math::cyl_neumann(v, z);
43}
44
55template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
56 require_not_var_matrix_t<T2>* = nullptr>
57inline auto bessel_second_kind(T1&& a, T2&& b) {
59 [](auto&& c, auto&& d) {
60 return bessel_second_kind(std::forward<decltype(c)>(c),
61 std::forward<decltype(d)>(d));
62 },
63 std::forward<T1>(a), std::forward<T2>(b));
64}
65
66} // namespace math
67} // namespace stan
68
69#endif
auto apply_scalar_binary(F &&f, T1 &&x, T2 &&y)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
fvar< T > 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 ...