Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: As simple as it is now, I am still against motion 24.03...



On 2011-06-15 15:38:49 -0400, Michel Hack wrote:
> Vincent wrote:
> > since the first one (x -> [x,x]) is exact.
> 
> Only if the scalar x and the interval use the same FP format.  That's
> only a given if the environment supports only a single format (precision
> and radix).

OK, so supporting point-to-interval functions could be useful in the
following case: the floating-point system supports two formats F1 and
F2 with F1 < F2 (ordered by inclusion) and the IA system supports a
F1-based interval format I[F1], but not a F2-based interval format,
and you would like functions whose inputs are in F2 and output in
I[F1].

If you want to support such functions, would there be a reason not
to support a F2-based interval format? Said otherwise, is it much
more complex to support I[F2] than F2->I[F1] functions?

> It gets worse when literals are involved, e.g. 0.1 in a binary environment.
> So interval arguments must ALWAYS come from an explicit constructor in my
> opinion.

Yes, probably (a constructor where 0.1 would be seen as a string
or decimal constant). BTW, such problems also exist for multiple
precision (MPFR users should avoid double-to-MPFR conversions with
such constants).

> As I've mentioned in the past, Translation-Time-Types as proposed
> in one of the C99 revision documents could provide the necessary
> syntactic sugar, but I've not seen this carried to completion, and
> one intermediate proposal I saw a few years ago got it wrong.

-- 
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 / Arénaire project (LIP, ENS-Lyon)