Re: dependent and independent intervals, proposal to toss out text2interval. Was re: about emp (was: Motion 42:no)
On 2013-02-19 17:34:33 -0500, Michel Hack wrote:
> Richard Fateman wrote:
> > I think that whatever advantage can be gained by allowing an
> > implementation to process string expressions like "0.1 + pi"
> > is more than overcome by requiring the library of programs
> > double_float_text2interval etc. to include a parser, evaluator
> > of arbitrary-precision (or perhaps exact rational) arithmetic,
> > an algebraic simplifier, and perhaps more.
>
> The standard does not require this, but it allows it. It makes
> it possible for a standard-complying implementation to offer tight
> enclosures, which would not be possible if one had to go through
> standard non-interval literals, which would most likely suffer
> inappropriate rounding (unless one carries the context around,
> as in my macro example below).
[...]
And I would add that it doesn't make the standard more complex.
Moreover an arithmetic where 0.1 + pi is exactly representable
might be used, e.g. something based on Q[pi] or simpler. This
could be useful when trig functions are used. In such an
arithmetic, sqrt(cos([0,pi/2])) could be evaluated without
the drawback of some values being undefined.
Perhaps such an arithmetic hasn't been implemented yet, but the
standard (that will be there for many years in the future) should
encourage new arithmetics rather than forbidding them.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)