log

Syntax

log(X)

Arguments

X is a scalar/vector/pair/matrix/table.

Y (optional) is a positive number indicating the base.

Details

  • If Y is not specified: return the natural logarithm of X.
  • If Y is specified: return the logarithm of X to base Y.

Examples

log(2.718283);
// output: 1
log(0 1 2 3);
// output: [,0,0.693147,1.098612]
log(100, 10)
// output: 2