Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>log</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
log

Usage

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

   ANSI

Description

   log returns the natural logarithm of x. The value of x must be > 0.

Example 

   #include <math.h>
   #include <stdio.h>
   #include <stdlib.h>

   int main(int argc,char **argv)
   {
       double d,result;
       d = atof(argv[1]);
       result = log(d);

       printf("The log of %.2f is %f\n",d,result);
       return EXIT_SUCCESS;
   }

Return Value

   The log function returns the logarithm result or domain error if x < 0,
   range error if x == 0.

See Also

   exp, log10, pow, sqrt



See Also: exp log10 pow sqrt

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson