Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ log10() [6/8]

template<typename T , require_arithmetic_t< T > * = nullptr>
auto stan::math::log10 ( T &&  a)
inline

Return the base 10 logarithm of the arithmetic argument.

Return the base 10 log of the specified variable (cmath).

Return the base 10 logarithm of the complex argument.

Template Parameters
VArithmetic argument
Parameters
[in]xargument
Returns
base 10 logarithm of the argument
Template Parameters
Vcomplex<Arithmetic> argument
Parameters
[in]xargument
Returns
base 10 logarithm of the argument

The derivative is defined by

\(\frac{d}{dx} \log_{10} x = \frac{1}{x \log 10}\).

\[ \mbox{log10}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \log_{10}(x) & \mbox{if } x \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{log10}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \frac{1}{x \ln10} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

Template Parameters
TArithmetic or a type inheriting from EigenBase.
Parameters
aVariable whose log is taken.
Returns
Base 10 log of variable.

Definition at line 23 of file log10.hpp.