Re: Draft: P1788.1 Standard for Interval Arithmetic (Simplified)
On 2015-09-07 22:25:23 +0200, Oliver Heimlich wrote:
> On 07.09.2015 21:37, Walter Mascarenhas wrote:
[...]
> >Consider now g(x) = 2 * arctan(x) / pi. Again, I believe that
> >the standard requires that g( [-oo,+oo]_dac ) should return [-1,1]_dac,
>
> Yes.
>
> >but this implies that g( f([0,1]) ) returns [-1,1] dac, and I find
> >this odd because g(f(.)) is continuous and (numerically) bounded
> >in [0,1], and due to the unboundedness of the numerical f(I)
> >we loose the information that I is bounded.
>
> You could implement a function h = g ∘ f, which respects this property. Then
> a user could use optimized h and everything would be fine. If g and f are
> implemented separately, they must (each) strictly follow the rules.
Or the user can choose a language that does/allows this for him. This
would be similar to contraction of floating-point expressions in ISO C,
where when this is enabled, an expression may be regarded as an atomic
operation by the implementation (i.e., in general, the compiler).
However this should be clearly specified (for instance, the obtained
result is not necessarily the same as the one one would have got for
a native function, i.e. it is not necessarily "optimal") and the user
should still be able to express that f and g are applied separately.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)