All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
log2.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_LOG2_HPP
#define STAN_MATH_PRIM_SCAL_FUN_LOG2_HPP
#include <stan/math/prim/scal/fun/constants.hpp>
#include <boost/math/tools/promotion.hpp>
#include <stdexcept>
namespace stan {
namespace math {
template <typename T>
inline typename boost::math::tools::promote_args<T>::type
log2(const T a) {
using std::log;
return log(a) / LOG_2;
}
inline double log2() {
return LOG_2;
}
}
}
#endif
stan::math::LOG_2
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
stan::math::log
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
constants.hpp
stan::math::log2
fvar< T > log2(const fvar< T > &x)
Definition: log2.hpp:17

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