* SIGFPE with gcc 2.7.2.1 (from alphabits)
@ 1997-08-26 16:17 Tom Browder
0 siblings, 0 replies; 3+ messages in thread
From: Tom Browder @ 1997-08-26 16:17 UTC (permalink / raw)
I'm getting a SIGFPE when multiplying together
two SMALL numbers (~1e-311 and 1e-11).
The same multiplication on my PC Linux box returns zero
which is perfectly acceptable. I can find nothing
in gcc info about this behavior. Is there
some flag (or?) I can set to correct this?
Thanks.
Tom Browder
P.S. Using gcc from alphabits.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <Pine.LNX.3.95.970826110714.1661A-100000@tomtom.asi-fwb.com>]
* Re: SIGFPE with gcc 2.7.2.1 (from alphabits)
[not found] <Pine.LNX.3.95.970826110714.1661A-100000@tomtom.asi-fwb.com>
@ 1997-08-27 8:30 ` Benoit E. Donnette
0 siblings, 0 replies; 3+ messages in thread
From: Benoit E. Donnette @ 1997-08-27 8:30 UTC (permalink / raw)
On Tue, 26 Aug 1997, Tom Browder wrote:
| I'm getting a SIGFPE when multiplying together
| two SMALL numbers (~1e-311 and 1e-11).
| The same multiplication on my PC Linux box returns zero
| which is perfectly acceptable. I can find nothing
| in gcc info about this behavior. Is there
| some flag (or?) I can set to correct this?
|
| Thanks.
|
| Tom Browder
|
| P.S. Using gcc from alphabits.
|
Well, I am about to beleive that this should be the correct behaviour
(well, the mathematician's speaking maybe...). I am not sure what the IEEE
standard says about this, but a good solution is to catch the signal and
handle the case as an exception.
Benoit E. Donnette, CMO Toulouse donnette@spot6.meteo.fr
Ancien eleve de l'Ecole Centrale Paris - France
Old member of Pembroke College Cambridge - England
**Mathematiques et informatique theorique**
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SIGFPE with gcc 2.7.2.1 (from alphabits)
@ 1997-08-27 9:53 Craig Burley
0 siblings, 0 replies; 3+ messages in thread
From: Craig Burley @ 1997-08-27 9:53 UTC (permalink / raw)
>| I'm getting a SIGFPE when multiplying together
>| two SMALL numbers (~1e-311 and 1e-11).
>| The same multiplication on my PC Linux box returns zero
>| which is perfectly acceptable. I can find nothing
>| in gcc info about this behavior. Is there
>| some flag (or?) I can set to correct this?
>
>Well, I am about to beleive that this should be the correct behaviour
>(well, the mathematician's speaking maybe...). I am not sure what the IEEE
>standard says about this, but a good solution is to catch the signal and
>handle the case as an exception.
Hmm...(1e-311 * 1e-11) == (1e-322), right? If you're using an
IEEE 754 double-precision multiply, the left operand is certainly
not normalized (a denormal); and so is the result. (Smaller than
about 5e-324 and you've underflowed the double-precision representation,
I believe.)
I think some/all Alpha CPUs raise an exception when math operations
would result in denormals, with the idea that the software will
take over, which I think normally means Linux, or the debugger,
or whatever. Maybe however the left operand was obtained involved
a path that didn't mind it being a denormal, e.g. a direct load
from memory, or maybe even a "friendly" conversion routine that
handles denormals directly.
I've found things like this in the past, and upgrading to more recent
versions of software has helped. Perhaps the program you're running
is catching SIGFPE's for some other reason, which might be
interfering with the normal handling for software-emulated denormals?
Dunno, since I don't yet know much about the UNIX/Linux exception-
handling model. (The only system whose model I did know a fair
amount about was PRIMOS, which hardly helps here.)
--
"Practice random senselessness and act kind of beautiful."
James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-08-27 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-26 16:17 SIGFPE with gcc 2.7.2.1 (from alphabits) Tom Browder
[not found] <Pine.LNX.3.95.970826110714.1661A-100000@tomtom.asi-fwb.com>
1997-08-27 8:30 ` Benoit E. Donnette
-- strict thread matches above, loose matches on Subject: below --
1997-08-27 9:53 Craig Burley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox