From: Jim Paradis <paradis@linux01.hlo.dec.com>
To: axp-list@redhat.com
Subject: Re: denorms on the alpha
Date: Mon, 20 Jul 1998 16:24:54 -0400 (EDT) [thread overview]
Message-ID: <199807202024.QAA00623@linux01.hlo.dec.com> (raw)
In-Reply-To: <199807201924.PAA05974@cobra.cs.virginia.edu> from "Greg Lindahl" at Jul 20, 98 03:24:49 pm
> 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?
Well... depends on how you want to handle things. Ideally, yes; floating
point calculations should always take place with valid numbers, never
overflow, never divide by zero, never do anything that'll generate an
exception. In the real world, though, this isn't always the case. I
just read an article about the US Navy ship Yorktown. They're running
the whole ship on a non-UNIX operating system (I am Not Telling which
one...). An officer entered a zero into a field, which caused a divide
by zero error, which wasn't handled by the application or the OS (the
article wasn't clear). The resulting crash shut down the ship's propulsion
system; they were dead in the water for a couple of hours until they
could reboot everything.
If you want "quiet" exception behavior according to the IEEE spec (i.e.
FP ops on denorms or NaNs or infinities produce the appropriate NaN
results but otherwise don't affect program execution flow) then you have
to specify "-mieee" to the compiler and pay a performance penalty.
If you can scrub your code so that these things *don't* happen, then
you can take advantage of Alpha pipelining, omit the "-mieee", and
run much faster.
--
Jim Paradis (paradis@linux01.hlo.dec.com) "The early bird gets the worm.
Compaq Computer Corporation If you want something else for
(508)841-3243 breakfast, get up later."
http://www.tiac.net/users/jrp/index.html
next prev parent reply other threads:[~1998-07-20 20:31 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 [this message]
1998-07-20 20:37 ` Wes Bauske
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