1#ifndef STAN_MATH_PRIM_CONSTRAINT_PROB_FREE_HPP
2#define STAN_MATH_PRIM_CONSTRAINT_PROB_FREE_HPP
28 auto&& y_ref =
to_ref(std::forward<T>(y));
29 check_bounded<plain_type_t<T>, double,
double>(
30 "prob_free",
"Probability variable", y_ref, 0, 1);
31 return logit(std::forward<
decltype(y_ref)>(y_ref));
fvar< T > logit(const fvar< T > &x)
auto prob_free(T &&y)
Return the free scalar that when transformed to a probability produces the specified scalar.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...