Michel, Baker, George etc.
On 4 Sep 2011, at 23:37, Michel Hack wrote:
1. Every (bare) interval type T must have a loss-free way to write
any datum (i.e. interval) in T as text, and to read that text
back to recover the original datum exactly.
Assuming we're going back to the same representation (e.g. on the same
platform). Even then it needs the concept of recovery conversion
With respect, I think Michel's reply, and subsequent ones from Baker& George, are transverse to the main question I asked. For one thing they relate mainly to my "solution 5b"; not 5a or 5c. In fact isn't 5b a sort of encryption of the binary data? It's only because of our decimal heritage that we don't consider it weird.
We have chosen to lumber ourselves with... delete that, I know it is for a good reason -- chosen to support ... interval types beyond basic IEEE754 inf-sup. My basic point is philosophical with legal overtones:
Is the (documented) text representation of some exotic interval
type a sufficient basis for a "contract" between the supplier and
the user of that type?
(Maybe a figurative contract, but possibly a real one: I buy your
special interval hardware and you warrant it does X, Y, Z.)
Enabling data interchange between machines is useful but secondary. If what I ask for is done -- i.e. if there is an algorithm to convert text string to mathematical interval and back -- it is NECESSARILY possible, even from my laptop to a base 7 machine implemented by little green men on Mars scribbling on slates.
Inward versus outward rounding seems, to me, a complete red herring. Suppose I'm talking about FP datums whose internal format is 3-bit binary and I map the numbers 0, 0.125, 0.25, 0.375, ..., 0.875, 1, by round-to-nearest, to 1-digit decimal strings "0", ".1", ".3", ".4", ..., ".9", "1". Then I think converting back to 3-bit binary using round-to-nearest recovers the original numbers in each case.
Using the same method for intervals in the obvious way, xx = [0.25,0.625] converts to "[.3, .6]" converts back to xx. The fact that the interval [.3, .6] doesn't enclose xx is irrelevant. This particular text representation wasn't intended to be interpreted that way.
My question is about a "contract". Maybe not well expressed, and I hope someone can say it better.
John