Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: OK, now I see Re: Motion P1788/M0013.04 - Comparisons - Overflow / Infinity



John Pryce wrote:
Ian, P1788, Nate

On 22 Sep 2010, at 06:00, Ian McIntosh wrote:
I don't think we made a firm decision on how and where decorations are stored, but the general assumption seems to be that in 1788 implementations based on 754, they'd be stored in the payload of a 754 NaN.

I am rather baffled by this. A decorated interval can have an arbitrary value as its interval part.

Suppose what I expect will be the commonest interval format: inf-sup with 754 binary64 bounds. Then a decorated nonempty interval [xlo,xhi], say, will be stored as [(interval part) = (8 bytes for xlo) + (8 bytes for xhi)] + (decoration part).

Where is the NaN? I've always been assuming the decoration will be a separate byte, giving 17 bytes in all.


In the above case of a decorated interval, the NaNs wouldn't strictly be necessary.

But PLEASE keep in mind that Motion 8 ALSO allows a "bare decoration," which is what remains after a forgetful operator strips away the interval portion of a decorated interval, i.e., when the low 16 bytes representing the endpoints are thrown away.

That is the hypothetical situation where the decorations in the 17th byte could be moved into the NaN payloads of the lower 16 bytes, hence allowing the 17th byte to be discarded. What remains, then, is a 16 byte "bare decoration" that can now fit nicely in a power-of-two hardware register.

Of course, the lower 16 bytes could be discarded instead, leaving us with only a single bare decoration byte. This is an example how a Level 2 object, i.e., the "bare decoration," might actually have two different representations at Level 3.

Also, please keep in mind that in the case the bare decoration is specified by NaNs (and not a single byte), a special bit in the NaNs might be used to distinguish them either as a "bare decoration" or as "the empty set." THe former is not a bare interval. The latter is. Its not so complicated if you keep the Level 2 model in your head and realize we are just using NaNs at Level 3 to represent different Level 2 objects in this case.





BTW, Nate: I have also found your notion of a "bare decoration" puzzling, since sometimes it seemed to be just a byte, and sometimes something stored in payload of a NaN within the interval part. Can you clarify?

Sure. As just mentioned above, I've always assumed it could be both.

Since a bare decoration is a Level 2 concept, there is no reason it might not have different representations at Level 3 or Level 4, depending on what is most convenient for the implementation and/or application user.

This is one reason using a Level structure to keep Level 2 and Level 3 concepts separated is so important, since at Level 2 it hides these kinds of implementation details as we develop the mathematical theory. Yet when we finally get to the nitty-gritty of Level 3 and Level 4 we then can "twiddle the bits" as necessary to get good implementations in software and/or hardware. For example, nothing says we can't have different Level 3 objects representing the same Level 2 object, particularly if this provides a real benefit to users and/or implementors. I suspect this will be the case for "bare decorations."

Nate



Now we are getting close to the nitty-gritty, it's important we have a common understanding of these issues, so we can discuss alternatives intelligently.

John