From Clomosy Docs

Revision as of 10:52, 7 October 2024 by ClomosyManager (talk | contribs)

The Ln function takes an integer or floating point Number and gives the natural logarithm of that number. This is only used for mathematical processing.

Ln has the opposite effect to Exp - the exponent of a number.

Example
TRObject Syntax

var
    float,number : float;
 
 {
 
   number = 2.14;
   float = Ln(number);
   ShowMessage('Ln('+FloatToStr(number)+') = '+FloatToStr(float));
 
   float = Exp(float);
   ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float));
 }

Base Syntax

 var
    float,number : float;
 
 begin
 
   number := 2.14;
   float := Ln(number);
   ShowMessage('Ln('+FloatToStr(number)+') = '+FloatToStr(float));
 
   float := Exp(float);
   ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float));
 end;

Output:

See Also