Log

The   NWScript command returns the natural logarithm of a float. That is, this command implements the mathematical function often written as "$$\ln x$$" (not what is often written as "$$\log x$$", namely the base 10 logarithm). This command will return zero if the supplied number is not positive.

Definition
$$

Examples
A general logarithm function, one that returns logarithms for bases other than the natural base, could be written as follows.

float genlog(float fValue, float fBase) {   return log(fValue) / log(fBase); }