Loading...
Select Version
&pagelevel(4)&pagelevel
Definition | #include <math.h> double log10(double x); These functions calculate the natural logarithm of the positive floating-point number x to the base 10. | |
Return val. | lg(x) | for positive x. |
| depending on the function type, | |
Example | #include <math.h> #include <stdio.h> int main(void) { double x; printf("Example of log10(x): Please enter x\n"); if(scanf("%lf", &x) == 1) printf("x = %g log10(x) = %g\n", x, log(x)); return 0; } | |
See also | log, log2, exp, exp2 |