On Wed, Apr 26, 2000 at 11:03:45AM -0500, Dan Nelson wrote:
> In the last episode (Apr 26), Sheldon Hearn said:
> > On Tue, 25 Apr 2000 00:05:23 MST, Brooks Davis wrote:
> > > > Is FreeBSD's behavior correct?  Why or why not?  You can use the
> > > > included code snippet to verify that this occurs.
> > > 
> > > FreeBSD has traditionaly violated the IEEE FP standard in this
> > > regard. This is fixed in 5.0 and I think in 4.0-STABLE (though I
> > > can't remember what file this is in so I can't check.)
> > 
> > Huh?  I'm pretty sure you've got this backwards.  FreeBSD has
> > traditionally upheld the standard and we only recently decided to go
> > with the flow in 5.0.
> 
> No; we held our moral ground against IEEE, until 5.0 when we gave in. 
> The IEEE standard says "trap nothing".  For most programs, this is the
> wrong thing to do, since they are not signal-processing apps or
> numerical analysis programs and a divide by zero is a coding error. 
> I'd rather have my program die on an unexpected divide by zero than
> continue with invalid data.
> 
> Why should we treat (1.0/0.0) any differently from (1/0)?

Because 0.0 might be the closest approximation to whatever
number you were really trying to divide by that the hardware can
manage.  0 is never an approximation to 1 or -1.

Dividing is for wimps, anyway.    :-)

-- 
Andrew


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to