Automatic Differentiation
 
Loading...
Searching...
No Matches
log10.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_FWD_FUN_LOG10_HPP
2#define STAN_MATH_FWD_FUN_LOG10_HPP
3
9#include <cmath>
10#include <complex>
11
12namespace stan {
13namespace math {
14
15template <typename T>
16inline fvar<T> log10(const fvar<T>& x) {
17 if (x.val_ < 0.0) {
19 } else {
20 return fvar<T>(log10(x.val_), x.d_ / (x.val_ * LOG_TEN));
21 }
22}
23
31template <typename T>
32inline std::complex<fvar<T>> log10(const std::complex<fvar<T>>& z) {
34}
35
36} // namespace math
37} // namespace stan
38#endif
std::complex< V > complex_log10(const std::complex< V > &z)
Return the base 10 logarithm of the complex argument.
Definition log10.hpp:89
static constexpr double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition constants.hpp:56
static constexpr double LOG_TEN
The natural logarithm of 10, .
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 ...
Scalar val_
The value of this variable.
Definition fvar.hpp:49
Scalar d_
The tangent (derivative) of this variable.
Definition fvar.hpp:61
This template class represents scalars used in forward-mode automatic differentiation,...
Definition fvar.hpp:40