User Tools

Site Tools


4rpl:commands:ln

Index
Math

ln

LN

Description

The natural logarithm. Gives the magnitude of the number. On zero, returns -inf. Below zero, returns NaN, a special value that always causes failure when compared to other numbers. Eg. (NaN<0) -> false, (Nan>=0) -> false

other logarithms

ln(x) = log(x, e)
ln(x)/ln(10) = log10(x)
ln(2)=0.6931…
ln(e)=.999999
ln(10)=2.3026…

Examples

trace(ln(-1)) #prints 'NaN'
trace(ln(0))  #prints '-inf'
trace(ln(1))  #prints '0'
trace(ln(e))  #prints '1'

Index

4rpl/commands/ln.txt · Last modified: 2022/05/19 06:20 by Karsten75