# log2

Version:

Computes the base 2 logarithm of the input elements.

## Syntax

c = log2(a)
[f, e] = log2(a)

## a

Scalar or array of any dimension of floating point or complex numbers.

## c

Base 2 logarithm of the elements in a. c returns complex numbers for negative or complex elements in a. c is an array of the same size as a.

## f

Binary mantissa of the elements in a. f is an array of the same size as a.

## e

Binary exponent of the elements in a. e is an array of the same size as a.

## Special Cases

The base 2 logarithm of zero is -inf.

[f, e] = log2(a) splits the input elements into binary mantissa f and exponent e so that the absolute value of f is equal to or greater than 0.5 and less than 1, and e is an integer. If a = 0, f = e = 0.

A = [0.1, 1; 10, 100]
C = log2(A)

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices