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
8#include <cmath>
9#include <complex>
10
11namespace stan {
12namespace math {
13
14template <typename T>
15inline fvar<T> log10(const fvar<T>& x) {
16 using std::log;
17 using std::log10;
18 if (x.val_ < 0.0) {
20 } else {
21 return fvar<T>(log10(x.val_), x.d_ / (x.val_ * LOG_TEN));
22 }
23}
24
32template <typename T>
33inline std::complex<fvar<T>> log10(const std::complex<fvar<T>>& z) {
35}
36
37} // namespace math
38} // namespace stan
39#endif
std::complex< V > complex_log10(const std::complex< V > &z)
Return the base 10 logarithm of the complex argument.
Definition log10.hpp:69
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