log2

Syntax

log2(X)

Arguments

X is a scalar/vector/matrix.

Details

Return the logarithm of X to the base 2.

Examples

$ log2(4);
2

$ log2(0 2 4 8 NULL);
[,1,2,3,]

$ log2(1..4$2:2);

#0

#1

0

1.584963

1

2