C++ function that do base 10 significant + exponent calculation from double
<p>I need to represent numbers using the following structure. The purpose of this structure is not to lose the precision.</p>

<pre><code>struct PreciseNumber
{
   long significand;
   int exponent;
}
</code></pre>

<p>Using this structure actual double value can be represented as <code>value = significand * 10e^exponent</code>. </p>

<p>Now I need to write utility function which can covert double into PreciseNumber. </p>

<p>Can you please let me know how to extract the exponent and significand from the double?</p>
