Automatic Differentiation
 
Loading...
Searching...
No Matches
prob_free.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_CONSTRAINT_PROB_FREE_HPP
2#define STAN_MATH_PRIM_CONSTRAINT_PROB_FREE_HPP
3
7
8namespace stan {
9namespace math {
10
26template <typename T>
27inline T prob_free(const T& y) {
28 check_bounded<T, double, double>("prob_free", "Probability variable", y, 0,
29 1);
30 return logit(y);
31}
32
33} // namespace math
34} // namespace stan
35#endif
fvar< T > logit(const fvar< T > &x)
Definition logit.hpp:14
T prob_free(const T &y)
Return the free scalar that when transformed to a probability produces the specified scalar.
Definition prob_free.hpp:27
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...