File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # LN
2+
3+ ## Syntax
4+
5+ ```
6+ LN(numericExpression)
7+ ```
8+
9+
10+ ## Description
11+
12+ Returns the Natural Logarithm of the _ numeric expression given_ .
13+ A natural logarithm is a logarithm in base _ e_ (_ e_ value can be
14+ obtained with ` EXP(1) ` ).
15+
16+ Both the argument and the result are of type ` Float ` .
17+
18+ ## Examples
19+
20+ ``` basic
21+ PRINT "LN(10) is "; LN(10)
22+ ```
23+
24+ You can compute the logarithm in any ` base ` dividing ` LN(x) ` by ` LN(base) ` :
25+
26+ ``` basic
27+ PRINT "LN2(8) is "; LN(8) / LN(2) : REM Base 2 Logarithm
28+ PRINT "LOG(100) is "; LN(100) / LN(10) : REM Base 10 Logarithm
29+ ```
30+
31+
32+ ## Remarks
33+
34+ * This function is 100% Sinclair BASIC Compatible
35+ * If the given argument type is not float, it will be [ converted] ( cast.md ) to float before operating with it.
36+
37+ ## See also
38+
39+ * [ EXP] ( exp.md )
You can’t perform that action at this time.
0 commit comments