Automatic Differentiation
 
Loading...
Searching...
No Matches
real.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_REAL_HPP
2#define STAN_MATH_PRIM_FUN_REAL_HPP
3
5#include <complex>
6
7namespace stan {
8namespace math {
9
17template <typename T, require_autodiff_t<T>>
18T real(const std::complex<T>& z) {
19 return z.real();
20}
21
22} // namespace math
23} // namespace stan
24
25#endif
T real(const std::complex< T > &z)
Return the real component of the complex argument.
Definition real.hpp:18
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...