math.log: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=math.log |trusted=false |version=1.3.b48 (estimate) |description=Find the [https://en.wikipedia.org/wiki/Natural_logarithm natural logarithm] of a number...")
 
No edit summary
Line 12: Line 12:
|examples=
|examples=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: math.listMax(1)]
[r: math.log(1)]
[h: e = 2.71828182845904523536028747135266249775724709369995]
[h: e = 2.71828182845904523536028747135266249775724709369995]
[r: math.log(e)]
[r: math.log(e)]

Revision as of 16:56, 19 February 2021

math.log() Function

Introduced in version 1.3.b48 (estimate)
Find the natural logarithm of a number. A non-numeric argument will produce an error.

Usage

[h: result = math.log(num)]

Examples

[r: math.log(1)]
[h: e = 2.71828182845904523536028747135266249775724709369995]
[r: math.log(e)]

Returns:

 0
 1.0