<- PRPL reference <- Math

ln

ArgumentsResultNotation
float float [float- float]

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. (ie. (NaN<0) -> false, (Nan>=0) -> false)<br/> other logarithms<br/> ln(x) = log(x, e)<br/> ln(x)/ln(10) = log10(x)<br/> ln(2)=0.6931…<br/> ln(e)=.999999 <br/> ln(10)=2.3026…<br/>

Examples

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