log10
double  log10 ( double x );
math.h
  cplusplus.com  

Calculate logarithm base 10.
  Returns the logarithm base 10 of parameter x:   log10 x

Parameters.

x
Floating point value.

Return Value.
  Logarithm base 10 of x.

Portability.
  Defined in ANSI-C.
  ANSI-C++ adds float and double overloaded versions of this function, with the same bahavior but being both, parameter and result, of one of these types.

Example.

/* log example */
#include <stdio.h>
#include <math.h>

main ()
{
  double param, result;
  param = 1000.0;
  result = log10 (param);
  printf ("log10(%lf) = %lf\n", param, result );
  return 0;
}
Output:
log10(1000.000000) = 3.000000

See also.
  log, exp, pow, sqrt


© The C++ Resources Network, 2000