Automatic Differentiation
 
Loading...
Searching...
No Matches
abs.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_ABS_HPP
2#define STAN_MATH_REV_FUN_ABS_HPP
3
8#include <complex>
9
10namespace stan {
11namespace math {
12
40template <typename T>
41inline auto abs(const var_value<T>& a) {
42 return fabs(a);
43}
44
51inline var abs(const std::complex<var>& z) { return internal::complex_abs(z); }
52
53} // namespace math
54} // namespace stan
55#endif
V complex_abs(const std::complex< V > &z)
Return the absolute value of the complex argument.
Definition abs.hpp:97
fvar< T > abs(const fvar< T > &x)
Definition abs.hpp:15
fvar< T > fabs(const fvar< T > &x)
Definition fabs.hpp:15
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...