From Clomosy Docs

(Created page with " function Ln(Number Extended):Extended; 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.<br> Ln has the opposite effect to Exp - the exponent of a number.<br> '''Example:'''<br> '''var''' float,number : float;<br> '''begin'''<br> number := 2.14; float := Ln(number); ShowMessage('Ln('+FloatToStr(number)+') = '+FloatToStr(float));<br> float := Exp(f...")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
function Ln(Number Extended):Extended;
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
function Ln(const X: Extended): Extended;
</div>


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.<br>
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.<br>
Line 5: Line 7:
Ln has the opposite effect to Exp - the exponent of a number.<br>
Ln has the opposite effect to Exp - the exponent of a number.<br>


'''Example:'''<br>
<b>Example</b><br>
'''var'''
 
     float,number : float;<br>
<pre>
  '''begin'''<br>
var
   number := 2.14;
     float,number : float;
   float := Ln(number);
   
   ShowMessage('Ln('+FloatToStr(number)+') = '+FloatToStr(float));<br>
{
   float := Exp(float);
   number = 2.14;
   float = Ln(number);
   ShowMessage('Ln('+FloatToStr(number)+') = '+FloatToStr(float));
   float = Exp(float);
   ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float));
   ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float));
  '''end;'''
  }
</pre>
 
<b>Output:</b><br>
<div class="alert alert-success" role="alert" data-bs-theme="light">
Ln(2,14) = 0,76080582903376<br>
Exp(Ln(2,14)) = 2,14
</div>


'''Output:'''<br>
<h2> See Also </h2>
Ln(2,14) = 0,76080582903376
* [[System_Library#Math_Functions | Math Functions]]
Exp(Ln(2,14)) = 2,14
{{#seo:|title=Ln Using in Clomosy - Clomosy Docs}}
{{#seo:|description=Learn how to use the Ln function in Clomosy for calculating the natural logarithm of a number, essential for advanced mathematical processing.}}

Latest revision as of 15:10, 24 December 2024

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

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));
 }

Output:

See Also