<- PRPL reference <- Math

log

ArgumentsResultNotation
arg base float [float float- float]

Description

Allows the performance of arbitrary based logarithms. See examples. 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/> log(x,10) = log10(x)<br/> log(x,e) = ln(x)

Examples

trace(log(2 .5))   #prints '-1' 
trace(log(.25 .5)) #prints '2'