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

Re: formatOfMidpoint()



On 2012-02-11 21:47:39 -0500, Michel Hack wrote:
> Dan Zuras wrote, in reply to my suggestion of
> returning NaN when there is no interior point
> representable in the target format:
> 
> >  Besides, we have been scrupulously careful
> >  to eliminate the need for NaNs in the ordinary
> >  course of otherwise valid calculations.  It
> >  would be a shame to let the camel's nose in
> >  the tent now.
> 
> What about midpoint(Empty)?

NaN really makes sense. In particular, Empty would be obtained
after an "invalid" operation, e.g. sqrt([-2,-1]), and NaN would
propagate this information. And I think that the radius should
also be NaN (the empty set doesn't have a radius, not even 0).

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