Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Base 2 logarithm and floating-point number dissection

`Y = log2(X)`

`[F,E] = log2(X)`

This function corresponds to the ANSI

^{®}C function`frexp()`

and the IEEE^{®}floating-point standard function`logb()`

. Any zeros in`X`

produce`F = 0`

and`E = 0`

.