1#ifndef STAN_MATH_PRIM_FUN_LOG10_HPP
2#define STAN_MATH_PRIM_FUN_LOG10_HPP
22template <
typename T, require_arithmetic_t<T>* =
nullptr>
34template <
typename T, require_complex_bt<std::is_arithmetic, T>* =
nullptr>
35inline auto log10(
const T x) {
48 static inline auto fun(
const T& x) {
60template <
typename Container, require_ad_container_t<Container>* =
nullptr>
61inline auto log10(
const Container& x) {
73template <
typename Container,
75inline auto log10(
const Container& x) {
76 return apply_vector_unary<Container>::apply(
77 x, [](
const auto& v) {
return v.array().
log10(); });
90 static constexpr double inv_log_10 = 1.0f /
LOG_TEN;
91 return log(z) * inv_log_10;
require_t< container_type_check_base< is_container, base_type_t, TypeCheck, Check... > > require_container_bt
Require type satisfies is_container.
std::complex< V > complex_log10(const std::complex< V > &z)
Return the base 10 logarithm of the complex argument.
static constexpr double LOG_TEN
The natural logarithm of 10, .
fvar< T > log(const fvar< T > &x)
static constexpr double log10()
Returns the natural logarithm of ten.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...
static auto fun(const T &x)
Structure to wrap log10() so it can be vectorized.