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

Re: your mail



On 2012-02-29 11:43:45 -0500, Michel Hack wrote:
> Vincent Lef?vre wrote, in reply to Dan Zuras:
> > >       Coercion: mid_F(X) = if (abs_F(round2Nearest_F(mid(X))) = +inf)
> > >                               then roundToZero_F(mid(X))
> > >                            else round2Nearest_F(mid(X))
> >
> > For X = [0,+inf], this would give:
> >   * mid(X) = +inf
> >   * abs_F(round2Nearest_F(mid(X))) = +inf
> >   * roundToZero_F(mid(X)) = roundToZero_F(+inf) = +inf
> >
> > while I think you wanted Fmax_F. I don't think you can avoid it,
> > except artificially, e.g. with nextDown(+inf).
> 
> The "roundToZero" applies to the entire operation, in the spirit of 754,
> where there is only one rounding after a conceptually-exact computation.
> So there is nothing artificial about ending up with Fmax_F.

No, roundToZero does not apply to entire operations (this makes no
sense), but to unrounded results. Here the unrounded result mid(X)
is +inf, because at Level 1:

  (inf(X) + sup(X)) / 2 = (0 + (+inf)) / 2 = (+inf) / 2 = +inf

Then the rounded result is roundToZero_F(+inf) = +inf.

-- 
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)