Inhaltsverzeichnis

log10()

#include <cmath>

double log10 (double x) 

Liefert den Logarithmus von x zur Basis 10 für x>0.

Parameter

x positiver, reeller Logarithmand

Ergebnis

Rückgabewert: die Zahl, für die pow(10, Zahl) == x.

Bei negativem x wird errno auf EDOM gesetzt, bei x==0 auf ERANGE.

Siehe auch

exp(), log(), pow().

Beispiel

log10.cpp
#include <cmath>
#include <iostream>
 
int main()
{
  std::cout << "log10(100) = " << std::log10(100) << '\n';
}