1#ifndef STAN_MATH_PRIM_FUN_PROJ_HPP
2#define STAN_MATH_PRIM_FUN_PROJ_HPP
18template <
typename V, require_arithmetic_t<V>* =
nullptr>
19inline std::complex<V>
proj(
const std::complex<V>& z) {
35 return {std::numeric_limits<V>::infinity(), z.imag() < 0 ? -0.0 : 0.0};
std::complex< V > complex_proj(const std::complex< V > &z)
Return the projection of the complex argument onto the Riemann sphere.
std::complex< fvar< T > > proj(const std::complex< fvar< T > > &z)
Return the projection of the complex argument onto the Riemann sphere.
int is_inf(const fvar< T > &x)
Returns 1 if the input's value is infinite and 0 otherwise.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...