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

Re: floats and intervals, constants, 0.1, 1e400 and Inf



On Mon, 2008-11-10 at 05:13 -0800, Michel Hack wrote:
> Van Snyder wrote:
> > The proposal from IFIP WG 2.5 to P754 preferred that intervals be
> > provided with bounds represented by all types the implementor of
> > 754 provided.  Conversion between interval representations was not
> > addressed, but should have been.  Rounding the bounds outward seems
> > like the only sensible definition, unless one knows for sure that
> > one or the other bound is exact.  Providing conversions with flags
> > that indicate that one or the other bound is exact seems like too
> > much complication, at least for a first edition standard.
> 
> If converting to a wider type, no rounding occurs.

This depends upon whether one adopts the Kuki or Cody view of FP
numbers:  Are the unwritten bits random, or all zero?  If one adopts the
view that unwritten bits are all zero, then no rounding is needed.  If
one adopts the view that unwritten bits are random then downward
"rounding" of negative lower bounds and upward "rounding" of positive
upper bounds are needed.  By "rounding" in this context I mean filling
the new bits of the fraction with ones instead of zeroes.  For positive
lower bounds or negative upper bounds, the correct thing to do is fill
the new bits of the fraction with zeroes.

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder@xxxxxxxxxxxx       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.