Log
Function Log( numeric expression )
Returns the natural (base e) logarithm of numeric expression.
Syntax a = Log( x )
Remarks
Log returns the natural logarithm (base e, where e is ~2.718282...) of its argument.
The natural log of x is the power to which e would have to be raised to equal x.
Restrictions
If numeric expression is less than or equal to zero then a runtime error will occur and the script will be terminated.
See Also:
Example Script
NUMBER i
FOR i = -2 TO 10
IF i > 0 THEN
PRINT "Log "; i; " is "; LOG(i)
ELSE
PRINT "i is a really big and/or complex number"
ENDIF
NEXT i
Script Output
i is a really big and/or complex number
i is a really big and/or complex number
i is a really big and/or complex number
Log 1 is 0
Log 2 is 0.693147180559945
Log 3 is 1.09861228866811
Log 4 is 1.38629436111989
Log 5 is 1.6094379124341
Log 6 is 1.79175946922805
Log 7 is 1.94591014905531
Log 8 is 2.07944154167984
Log 9 is 2.19722457733622
Log 10 is 2.30258509299405