From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
<b>Example</b><br> | <b>Example</b><br> | ||
<pre> | <pre> | ||
var | var | ||
| Line 22: | Line 22: | ||
ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float)); | ShowMessage('Exp(Ln('+FloatToStr(float)+')) = '+FloatToStr(float)); | ||
} | } | ||
</pre> | </pre> | ||
Revision as of 12:06, 13 November 2024
function Ln(const X: 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.
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:
Ln(2,14) = 0,76080582903376
Exp(Ln(2,14)) = 2,14