[TOC]

log2

Log of Base 2

Usage

log2(A)

Example

Input
% Returning complex numbers.
log2([-inf rand + rand*i -rand])
% Returning real numbers.
log2([inf nan 0 rand])
Output
ans = 
 Inf    + 4.5324i   0.2044 + 0.7616i  -1.6523 + 4.5324i

ans = 1e-2 × 
 Inf      NaN     -Inf     -2.8720