Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - ln() return the natural logarithm of a numeric http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ln()                Return the natural logarithm of a numeric
------------------------------------------------------------------------------
 Declaration
   math.hdr

 Syntax
   func dbl ln extern
   param value dbl eNumber

 Arguments
   eNumber is a numeric expression.

 Return
   The natural logarithm of the passed numeric.

 Description
   The ln() function returns the natural logarithm of eNumber. ln( y )
   returns x where y = exp( x ). In this way the ln() function is the inverse
   of exp().

   Upon function return the value of the __matherror system variable can
   be tested for error values.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_ln
   set fixed on
   ? ln( 10 )                // prints 2.30
   ? exp( ln( 1 ) )          // prints 1.00
   ?
   set fixed off
   ? ln( 10 )
   ? exp( ln( 1 ) )
   ? ln( 10 * 2 )
   ? ln( 2.71 )
   endproc

   proc main
   Test_ln()
   endproc

See Also: exp() log()

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