Definition: |
atom x2 = log(atom x1)
-- or -- atom x2 = log10(atom x1) |
Description: | Return the natural or base 10 logarithm of x1. |
Comments: | This function may be applied to an atom or sq_log[10]() to all elements of a sequence. The rules for
sequence operations apply.
Note that log is only defined for positive numbers. Your program will abort with a message if you try to take the log of a negative number or zero. The builtin function exp(atom x) is the inverse of log, and is implemented simply as return power(E,x). There is no similar builtin function for the inverse of log10; you are expected to use power(10,x) directly. |
Example: |
a = log(100) -- a is 4.60517 b = log10(100) -- b is 2.0 (approx) |
See Also: | sin, cos, tan, sqrt, power |