All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
positive_free.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_POSITIVE_FREE_HPP
#define STAN_MATH_PRIM_SCAL_FUN_POSITIVE_FREE_HPP
#include <stan/math/prim/scal/err/check_positive.hpp>
#include <cmath>
namespace stan {
namespace math {
template <typename T>
inline
T positive_free(const T y) {
stan::math::check_positive("stan::math::positive_free",
"Positive variable", y);
return log(y);
}
}
}
#endif
check_positive.hpp
stan::math::log
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
stan::math::positive_free
T positive_free(const T y)
Return the unconstrained value corresponding to the specified positive-constrained value...
Definition: positive_free.hpp:29
stan::math::check_positive
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
Definition: check_positive.hpp:68

[ Stan Home Page ] © 2011–2015, Stan Development Team.