[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SIGFPE and -mieee



On Tuesday 17 June 2003 12:04 pm, Helge Kreutzmann wrote:
> If a program divides by zero, it is a bug. If it can't handle
> an overflow, it is a bug. If the author *knows* there could be
> a division by zero or simmilar, he/she has to provide checks.

If a program divides by zero or triggers a divide overflow in 
floating-point math, it's supposed to generate a very specific 
and clearly defined result per IEEE standards.  I don't see that 
it's a "bug" for a program to depend on industry standards being 
in effect.  It would be a nice "optimization" code-wise if it 
did not, and that optimization has real practical value on Alpha 
platforms prior to EV6.  On other platforms it's kind of 
pointless.

> -mieee is for software where speed is absolutly irrelevant and
> where bugs like those mentions are no problems (e.g. an office
> suite). Also it can be a first step to get an application
> running on alpha at all. But IMHO this should be decided on a
> case by case basis and not be stuck into every compilation;
> especially since several programs are fixed now and can work
> fine without -mieee (or never needed one in the first place).

I can appreciate that fixing the problem after discovery would be 
easy, but discovery is not always so easy.  Leaving out -mieee 
could cause latent misbehavior in an app--"walking wounded" that 
never even gets noticed and treated before it's back out in the 
field, then keels over three weeks later.  That doesn't sit well 
with me.

Basically, to prevent that, we'd need a top-notch engineer or two 
carefully and thoroughly auditing code for this problem as it 
comes in.  I'm not terribly sure we could find someone willing 
to spend his life in a basement poring over fifteen metric tons 
of code a month with a fine-tooth comb.  Sure I'd like stuff to 
perform at its best, even on obsolete machines, but it's really 
a question of how far we're willing or able to go for that.

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"



Reply to: