ln: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page ln to Ln without leaving a redirect: Converting page title to first-letter uppercase)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
ln(num)
ln(num)
</source>
</syntaxhighlight>
'''Parameter'''
'''Parameter'''
* {{code|num}} - The {{code|number}} used with the ''irrational constant'' to calculate the ''exponent''.
* {{code|num}} - The {{code|number}} used with the ''irrational constant'' to calculate the ''exponent''.
Line 14: Line 14:
|example=
|example=
'''Example 1'''
'''Example 1'''
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: ln(5)]
[r: ln(5)]
</source>
</syntaxhighlight>
'''Returns:''' {{code|1.6094379124341002817999424223671667277812957763671875}}
'''Returns:''' {{code|1.6094379124341002817999424223671667277812957763671875}}


'''Example 2'''
'''Example 2'''
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: ln(23)]
[r: ln(23)]
</source>
</syntaxhighlight>
'''Returns:''' {{code|3.13549421592914967504839296452701091766357421875}}
'''Returns:''' {{code|3.13549421592914967504839296452701091766357421875}}



Latest revision as of 20:12, 15 March 2023

ln() Function

Introduced in version 1.3b36
Returns the exponent that the irrational constant(approx. 2.718281828) would have to be raised to in order to equal the parameter.

Usage

ln(num)

Parameter

  • num - The number used with the irrational constant to calculate the exponent.

Example

Example 1
[r: ln(5)]

Returns: 1.6094379124341002817999424223671667277812957763671875

Example 2

[r: ln(23)]
Returns: 3.13549421592914967504839296452701091766357421875

See Also