LN
Syntax
Section titled “Syntax”LN(numericExpression)Description
Section titled “Description”Returns the Natural Logarithm of the numeric expression given.
A natural logarithm is a logarithm in base e (e value can be
obtained with EXP(1)).
Both the argument and the result are of type Float.
Examples
Section titled “Examples”PRINT "LN(10) is "; LN(10)You can compute the logarithm in any base dividing LN(x) by LN(base):
PRINT "LN2(8) is "; LN(8) / LN(2) : REM Base 2 LogarithmPRINT "LOG(100) is "; LN(100) / LN(10) : REM Base 10 LogarithmRemarks
Section titled “Remarks”- This function is 100% Sinclair BASIC Compatible
- If the given argument type is not float, it will be converted to float before operating with it.