Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: denorms on the alpha
Date: Mon, 20 Jul 1998 20:37:20 +0000	[thread overview]
Message-ID: <35B3AA80.F4A2B35@paralleldata.com> (raw)
In-Reply-To: 199807201924.PAA05974@cobra.cs.virginia.edu

Greg Lindahl wrote:
> 
> I've been beating on my people claiming kernel bugs on the alphas and
> I've found that at least some of their fp exceptions are derministic
> and are due to denormalized values. For example:
> 
> #include <stdio.h>
> 
> main () {
> 
>   union {
>     long long i;
>     double f;
>   } bob;
> 
>   bob.i = 2725351540;
>   printf ("The value is %g.\n", bob.f );
> 
>   bob.f *= 2;
> 
>   printf ("The value is %g.\n", bob.f );
> }
> 
> This program crashes when I multiply a denorm by 2. Is it the case
> under Linux/Alpha that denorms should never be generated and cause fp
> exceptions when you do any operations with them?
> 

The HW manual I looked at says this is not maskable. It
will always interrupt. The more common case is a FP
array being overwritten by something non-FP and then
attempting to do FP ops on it, or a non-initialized stack
variable being used. All cases I've found in my
code and others this was a bug in the code, not an
intended calculation. Intel seems to just treat this as
a real small number, effectively zero, so it has little
effect on the FP op, except maybe if you try divide by one.

I think Uncle George had a case where he thought it
was a valid calculation but I haven't.

A bug is a bug. If it were my code, I'd just fix it.
Only other choice is to slow down the code with -mieee.


Wes


  parent reply	other threads:[~1998-07-20 20:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-20 19:24 denorms on the alpha Greg Lindahl
1998-07-20 20:24 ` Jim Paradis
1998-07-20 20:37 ` Wes Bauske [this message]
1998-07-20 22:27   ` denorms on the alpha - confusion Phil Marsden
1998-07-20 22:18     ` Jim Paradis
1998-07-21  9:05       ` Richard Henderson
1998-07-21 10:44         ` Phil Marsden
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox