Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming you are using the IEEE standard, the formula for the representation of numbers is:</p> <pre><code>number = sign*(1+2^(-m)*significand)*2^(exponent-bias) </code></pre> <p>where <code>m</code> is the number of bits used to store the (integer) significand (or mantissa), and <code>bias</code> is equal to <code>2^(e-1) - 1</code> where <code>e</code> is the number of bits used to store the exponent.</p> <p>Let's see what we can derive from that. Note that</p> <ul> <li>The value of <code>significand</code> ranges between <code>0</code> and <code>2^m - 1</code> (in your case: between 0 and 1048575).</li> <li>The value of <code>exponent</code> ranges between <code>0</code> and <code>2^e - 1</code>. However, both extremal values are reserved for exceptions (subnormal numbers, infinites and NANs), called unnormalized numbers.</li> </ul> <p>Consequently,</p> <ul> <li>The smallest value for the fractional part <code>(1+2^(-m)*significand)</code> is 1, the biggest value is <code>2-2^(-m)</code> (in your case 2-2^(-20), approximately 1,999999046).</li> <li>The smallest non-exceptional value for the total exponent <code>exponent-bias</code> is <code>-2^(e-1)+2</code> (in your case -14), the biggest is <code>2^(e-1)-1</code> (in your case: 15).</li> </ul> <p>So it turns out that:</p> <ul> <li>The smallest (positive) normalized number that can be represented is <code>2^(-2^(e-1)+2)</code> (in your case 2^(-14), approximately 0,000061035)</li> <li>The biggest is <code>(2-2^(-m))*(2^(2^(e-1)-1))</code> (in your case (2-2^(-20))*(2^15), approximately 65535,96875).</li> </ul> <p>As for "machine precision", I'm not sure what you mean, but one calls <code>m+1</code> (21 here) the binary precision, and the precision in terms of decimal digits is <code>log10(2^(m+1))</code>, for you this is approximately 6.3.</p> <p>I hope I didn't get anything wrong, I'm no expert about this.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload