No, they each have a separate power of two in their canonical floating-hex (%a) representation
Yes, that was careless thinking ("thoughtless thinking" might be a better term) on my part.
So yes, we've probably gone far enough on this tangent.
However, there were a couple of things in your last post that I couldn't quite follow.
I'll mention them here, and you can respond if you like - but I think we both understand what we're doing, so please feel free to not respond at all. (I think you've probably already put more effort into this thread than you would have been expecting.)
IIUC, in respect to the value 0.3, you wrote "whereas the ULP is 3.5e-18", yet I believe it's actually 5.551115123125783e-17.
You also wrote "I have to subtract 23 ULP from the canonical 1.03 representation before it doesn't round up to 1.03 displayed".
I take it that was in relation to the difference between 1.03000000000000003e+00 and 1.02999999999999980e+00 .
Firstly, I think you should have been looking at the "%.16e" or "%.17g" (not "%.17e") formatting of the values.
Secondly, by my way of thinking, the difference between 0x1.07ae147ae147bp+0 and 0x1.07ae147ae147ap+0 is 1 ULP, irrespective of what the chosen decimal formatting shows.
Anyway, thanks for the time you've taken in clarifying and correcting.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.