Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ ub_free() [1/4]

template<typename T , typename U , require_not_std_vector_t< T > * = nullptr, require_stan_scalar_t< U > * = nullptr>
auto stan::math::ub_free ( T &&  y,
U &&  ub 
)
inline

Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound.

The transform is the reverse of the ub_constrain(T, double) transform,

\(f^{-1}(y) = \log -(y - U)\)

where \(U\) is the upper bound.

Template Parameters
Ttype of scalar
Utype of upper bound
Parameters
yconstrained scalar with specified upper bound
ubupper bound
Returns
unconstrained scalar with respect to upper bound
Exceptions
std::invalid_argumentif constrained scalar is greater than the upper bound.

Definition at line 35 of file ub_free.hpp.