##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::log10

From cppreference.com
< cpp‎ | numeric‎ | math

Defined in header `<cmath>` |  |
float log10( float arg ); |  |
double log10( double arg ); |  |
long double log10( long double arg ); |  |
double log10( Integral arg ); |  | (since C++11)

Computes the common (base 10) logarithm of `arg`.

### [edit] Parameters

arg | - | value of floating-point or Integral type

### [edit] Return value

Base 10 logarithm of `arg`.

Domain error occurs if `arg` is negative. NAN is returned in that case.

Range error occurs if `arg` is ​0​. -HUGE_VAL is returned in that case.

### [edit] See also

log | computes natural (base e) logarithm (to base e) (ln(x)) (function) [edit]
pow | raises a number to the given power (xy) (function) [edit]
log10(std::complex) | complex common logarithm with the branch cuts along the negative real axis (function template) [edit]
log10(std::valarray) | applies the function std::log10 to each element of valarray (function template) [edit]
C documentation for log10

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/math/log10&oldid=67127"