Re: Motions 54, 55, 56, 57: YES
Guillaume.
My understanding is that the purpose of a particular choice of T-hull
among different minimal enclosure in implicit types was for debugging and for reproducibility.
The tightest accuracy mode is required only for basic operations (add,sub,mul,div,sqrt,fma)
and for some other "easy" operations.
For other operations like "cospi", only valid accuracy mode required.
It seems that there is no even a requirement that valid result must contain T-hull of
exact result. It may be another minimul enclosure or non-minimal enclosure.
Hence, it is possible to design a conforming implementation.
Standard requires that there is a tigtest version of basic operation that reutrns T-hull
of exact result. And it also permits other versions of the same operation with weaker accuracies.
So I guess that implementations of implicit types will provide a tightest version,
it will be used in reproducibility computations.
And implementation will provide a valid version that will be used in performance-important computations.
-Dima
----- Исходное сообщение -----
От: guillaume.melquiond@xxxxxxxx
Кому: stds-1788@xxxxxxxxxxxxxxxxx
Отправленные: Пятница, 27 Декабрь 2013 г 13:36:12 GMT +04:00 Абу-Даби, Маскат
Тема: Re: Motions 54, 55, 56, 57: YES
On 27/12/2013 03:30, Vincent Lefevre wrote:
> §12.10.1: Concerning Guillaume's remark about the "tightest" mode
> with implicit types, I would not disagree to relax the spec.
> Similarly, I also made a remark in quite old discussions, wondering
> why a particular minimal enclosure had to be chosen for the T-hull,
> and I don't remember if there was any good reason. One should notice
> that with some particular implicit types, a minimal enclosure may be
> much wider than other ones, but I see such issues as QoI (just like
> the choice of the precision for the interval types). However, later
> in Guillaume's remark: "As a consequence, I believe it is impossible
> to design a conforming implementation.", I don't think this is true;
> any example?
Imagine you have two mathematical functions f1 and f2 and you are able
to implement the interval versions so that they always return minimal
enclosures. If you tell that "f1 is tightest", then you have a
conforming library. If you tell that "f2 is tightest", then you also
have a conforming library. But if you tell that "both f1 and f2 are
tightest", do you still have a conforming library? The lack of
modularity cannot be a good sign.
As for an actual example, I guess it will have to be a bit farfetched.
Consider cospi([0;0.25]) and sqrt([0.75;1]). (My trigonometry is a bit
rusty, so bear with me if I got the inputs wrong.) What are the chances
that the implementations return the exact same result for an implicit
type? Any of these two functions could be tightest taken in isolation,
but no longer when shipped together in a library.
Perhaps a bit less contrived: on one side you perform (1,1) + (1+e,1) in
mid-rad; one the other side you downgrade (2+e,2) from a larger format
(where 2+e is representable). Even if both the addition and the
conversion return a minimal enclosure, how do you guarantee that both
functions are tightest?
Best regards,
Guillaume