1#ifndef STAN_MATH_PRIM_CONSTRAINT_CORR_FREE_HPP
2#define STAN_MATH_PRIM_CONSTRAINT_CORR_FREE_HPP
29 auto&& y_ref =
to_ref(std::forward<T>(y));
30 check_bounded(
"lub_free",
"Correlation variable", y_ref, -1.0, 1.0);
31 return atanh(std::forward<
decltype(y_ref)>(y_ref));
fvar< T > atanh(const fvar< T > &x)
Return inverse hyperbolic tangent of specified value.
void check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Check if the value is between the low and high values, inclusively.
plain_type_t< T > corr_free(T &&y)
Return the unconstrained scalar that when transformed to a valid correlation produces the specified v...
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
typename plain_type< std::decay_t< T > >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...