How to operate (fast) on mantissa and exponent part of double or float at c++?
<p>I use c++ for computation of various type of special functions (e.g Lambert function, iteration methods for evaluate inversions etc.). In many cases there is an obviously better approach to work with a mantissa and exponent directly.</p>

<p>I found many answers how to extract mantissa and exponent parts, however all of them was just "academic cases with not very effective speed of computation" that are little bit useless for me (my motivation of operate with mantissa and exponent is in improvement of computational speed). Sometimes i need to call some specific function about billion times (very expensive computing) so every saved computational work is fine. And using "frexp" which return mantissa as double is not very fit.</p>

<p>My questions are (for c++ compiler with IEEE 754 floating point):</p>

<p>1) How to read specific bit of mantissa of float/double?</p>

<p>2) How to read whole mantissa into integer/byte of float/double?</p>

<p>3) The same questions as 1), 2) for exponent.</p>

<p>4) The same questions as 1), 2), 3) for write.</p>

<p>With respect that my motivation is faster computation if I work with mantissa or exponent directly. I suppose that there must be a very simple solution.</p>