Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> ln natural (e) logarithm pp 140</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LN                         Natural (e) Logarithm                     pp 140

 Syntax:  Ln (NumVar) ;

 Type:    Real

 Form:    Function

 Purpose: Natural logarithm of NumVar to base e (2.7182818285).

 Notes:   The log of NumVar is the inverse of the Exp of NumVar.
          Ln (Exp(1)) = 1.  The Exp of NumVar is also the AntiLogarithm
          of NumVar.

 Detail:  Logarithms are related to exponential numbers.  An exponential
          number takes a base, often base e and then raises it to a
          power (y).  This means that e is multiplied by itself y times.

          The logarithm is the inverse of the exponention function, and may
          be written as y = LOGb x.  Which is stated as "y equals log
          to the base b of x".  Natural logarithms (base e) are often
          abbreviated as Ln x.

          Logs allow multiplication, division, and exponentiation of
          complex numbers to be replace by simpler operations of addition,
          subtraction, and multiplication, respectively.

 Bases:   Common logs are to the base 10.
          Natural logs are to the base e.

 Laws:    LOGb (xy)   = LOGb(x) + LOGb(y)
          LOGb (x/y)  = LOGb(x) - LOGb(y)
          LOGb (x^n)  = n LOGb x


 ----------------------------------------------------------------------------


 Usage:
       VAR
          NumVar : Real          ;
          Result : Real          ;

       BEGIN
          NumVar := 2.7182818285 ;        { Value of e }
          Result := Ln (NumVar)  ;        { 1.00000    }
       END.

See Also: Exp Sqr Sqrt

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