log10

Computes the logarithm (base 10) of x

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Mathematical Computation

Syntax

  #include <math.h>  
   
  double log10  (  
     double   x);
  

Parameters

x
(IN) Specifies the argument for which the logarithm is to be computed.

Return Values

The log10 function returns the logarithm (base 10) of the argument. When an error has occurred, errno is set.

Remarks

The log10 function computes the logarithm (base 10) of x. A domain error occurs if the argument is negative. A range error occurs if the argument is zero.

See Also

exp, log, pow

Example

  #include <math.h>  
  #include <stdio.h>  
   
  main()  
  {  
     printf ("%f\n", log10 (.5) );  
  }
  

produces the following:

  -0.301030