English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
double log10(double x) returns the common logarithm of x (base 10) 10 logarithm).
double log10(double arg);
It accepts a parameter and returns a floating-point value.
[Mathematics] log10x = log10(x) in [C language]
It is in<math.h>Defined in header file.
log10To calculate long double or float, please use the following prototype.
long double log10l(long double arg); float log10f(float arg);
Parameter | Description |
---|---|
arg > 0 | Calculate log10(arg) result |
arg < 0 | Display runtime errors |
#include <stdio.h> #include <math.h> int main() { double num == 4.00, result; result = log10(num); printf("log10(%.1f) = %.2f", num, result); return 0; }
log(4.0) = 0.60