log, log10, logn

log, log10, logn — calculate logarithms.

Syntax

log (number)
log10 (number)
logn (base, number)

		

Arguments

number

Any numeric value.

base

The logarithmic base.

Returns

For log, the natural logarithm of the argument. For log10, the base 10 logarithm of the argument. For logn, the logarithm of the number in the given base.

Description

Non-numeric arguments are treated as zero. Illegal values for the arguments will cause an error.

Example

Gamma> log(2);
0.69314718055994528623
Gamma> log10(2);
0.30102999566398119802
Gamma> logn(8,2);
2.9999999999999995559
Gamma>