Automatic Differentiation
 
Loading...
Searching...
No Matches
lambert_w.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_LAMBERT_W_HPP
2#define STAN_MATH_PRIM_FUN_LAMBERT_W_HPP
3
7#include <boost/math/special_functions/lambert_w.hpp>
8
9namespace stan {
10namespace math {
11
20template <typename T, require_arithmetic_t<T>* = nullptr>
21inline double lambert_w0(const T& x) {
22 return boost::math::lambert_w0(x, boost_policy_t<>());
23}
24
34template <typename T, require_arithmetic_t<T>* = nullptr>
35inline double lambert_wm1(const T& x) {
36 return boost::math::lambert_wm1(x, boost_policy_t<>());
37}
38
39namespace internal {
40
50 template <typename T>
51 static inline auto fun(const T& x) {
52 return lambert_w0(x);
53 }
54};
55
66 template <typename T>
67 static inline auto fun(const T& x) {
68 return lambert_wm1(x);
69 }
70};
71} // namespace internal
72
81template <typename T, require_not_stan_scalar_t<T>* = nullptr,
82 require_not_var_matrix_t<T>* = nullptr>
83inline auto lambert_w0(const T& x) {
85}
86
96template <typename T, require_not_stan_scalar_t<T>* = nullptr,
97 require_not_var_matrix_t<T>* = nullptr>
98inline auto lambert_wm1(const T& x) {
100}
101
102} // namespace math
103} // namespace stan
104
105#endif
fvar< T > lambert_w0(const fvar< T > &x)
Definition lambert_w.hpp:13
fvar< T > lambert_wm1(const fvar< T > &x)
Definition lambert_w.hpp:19
boost::math::policies::policy< boost::math::policies::overflow_error< boost::math::policies::errno_on_error >, boost::math::policies::pole_error< boost::math::policies::errno_on_error >, boost::math::policies::promote_double< false >, boost::math::policies::digits2< B > > boost_policy_t
Boost policy that overrides the defaults to match the built-in C++ standard library functions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...
static auto fun(const T &x)
Definition lambert_w.hpp:51
Structure to wrap lambert_w0() so it can be vectorized.
Definition lambert_w.hpp:49
Structure to wrap lambert_wm1() so it can be vectorized.
Definition lambert_w.hpp:65