log
Table of Contents
Function
log — natural logarithm
Synopsis
log(val: number) -> float64
Description
The log function returns the natural logarithm of its argument val
, which
must be numeric. The return value is a float64 or an error.
Examples
The logarithm of various numbers:
yield log(this)
4
4.0
2.718
-1
Loading...
The largest power of 10 smaller than the input:
yield int64(log(this)/log(10))
9
10
20
1000
1100
30000
Loading...