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

Re: roundToZero_F(+inf) = +inf



Please educate me here.  Without actually looking
up what 754 specifies, my intuition would tell
me that roundToZero(+inf) would be HUGE (i.e.
the largest representable number)
and roundUp(HUGE) would be +inf.

(That is, for what it's worth in this context.)

Baker

On 03/01/2012 10:09 AM, Vincent Lefevre wrote:
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.



--

---------------------------------------------------------------
Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------