Re: The history of the word 'format' in 754...
Dan Zuras Intervals wrote:
From: "Nate Hayes" <nh@xxxxxxxxxxxxxxxxx>
Now lets examine, closely, what happens if we smiply pass a bare interval to
the sqrt() operation, instead:
Motion 8.02 says a bare interval may be promoted to a decorated interval in
order to participate in arithmetic operations. Hence, the bare interval
[-1,4] is promoted to the decorated interval xx = ([-1,4],domain:(T,F)).
Wait a minute: I don't want to argue with you
about what motion 8.02 says but isn't promoting
a bare interval to a decorated interval just
the sort of thing we are trying to avoid?
It should not happen without asking for it explicitly.
But of course the programmer should be able to do it by design.
If a programmer cannot be trusted to mean what is written explictly,
then no amount of standardization will help him.
And to tie the hands of a programmer will waste a lot of the potential
of the standard.
The decorated interval xx is then input to the sqrt() operation and the
exception is generated and recorded in the decoration of the decorated
interval output yy. So if I write a marcro or inline function:
bareOrDec(yy)
that returns the interval portion of yy if the decoration of yy is "safe"
but otherwise returns the decoration portion of yy, then:
bareOrDec(sqrt([-1,4]))
accomplishes the task.
Hmm. I'm not quite clear here. A bare interval
is one sort of thing & a bare decoration is
another. And you want a function that returns
one thing under some circumstances & another
under others?
He has a sqrt function that takes a decorated interval and returns one,
and has an overloading rule that tells how to decorate a bare interval
before executing the sqrt. Then he looks at the result and decides
(via bareOrDec) to keep the bare interval or the bare decoration,
depending on the outcome.