Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: y0000218@rzsrv2.rz.tu-bs.de
Subject: Re: Floating point problems
Date: Mon, 30 Nov 1998 08:16:11 GMT	[thread overview]
Message-ID: <199811300816.IAA24959@ppp393.ts.rz.tu-bs.de> (raw)

Heinz Ulrich Stille <Heinz.Ulrich.Stille@mbi-os.de> wrote:
: Hi!

: What's wrong with the following program?

: main() {
: 	double x = 1.0;
: 	x *= 1e-310;
: }

: This results in a floating point exception on my Ruffian (for values
: somwhere between 1e-300 and 1e-325, independent of kernel and compiler),
: but not on any intel. The assembler output seems to indicate that the
: two values are just loaded into registers and multiplied.
: What is going on?


This looks _very_ familiar - I had the same problem, same range of numbers.

It still reproducibly FP-exeptions on a RH 5.2 system here.

I think its weird, and noone could plausibly tell me why yet.

-mieee works, also fixing my code so it doesnt produce such
small numbers did it.

Could any guru tell me _why_ this code crashes?

Just doing anything with a number around 1e-310 raises an FP exception,
smaller _and_ larger numbers dont.

Olaf

-- 
"The number of Unix installations       Olaf Schnapauff,
has grown to 10, with more expected."   O.Schnapauff@tu-bs.de  
- The Unix Programmer's Manual,1972     http://www.tu-bs.de/~c0033014/
       See Web page and keyservers  for pgp public key


             reply	other threads:[~1998-11-30  9:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-30  8:16 y0000218 [this message]
1998-11-30  9:08 ` Floating point problems Carles Perello
1998-11-30  9:53 ` Joachim Wesner
1998-11-30 14:22   ` Alvin Starr
1998-11-30 13:27     ` krebs
1998-11-30 17:06 ` Joachim Wesner
1998-12-03  0:48   ` Richard Henderson
1998-12-03 16:59     ` Greg Lindahl
1998-12-03 19:35       ` Joachim Wesner
1998-12-03 20:04       ` Richard Henderson
1998-12-03 20:16         ` Greg Lindahl
1998-12-03 23:44         ` Joachim Wesner
1998-12-01  8:42 ` Jochen Kuepper
  -- strict thread matches above, loose matches on Subject: below --
1998-11-30 10:24 y0000218
1998-11-30 13:30 ` Alvin Starr
1998-12-03  0:48   ` Richard Henderson
1998-11-28 13:15 Heinz Ulrich Stille
1998-11-28 14:24 ` Johannes G.D. Hausmann
1998-11-28 13:58   ` Heinz Ulrich Stille
1998-11-28 14:48     ` Stefan Schroepfer
1998-11-28 14:57       ` Heinz Ulrich Stille
1998-11-29 13:15         ` Johannes G.D. Hausmann
1998-11-29 13:02           ` Heinz Ulrich Stille
1998-11-29 18:01           ` B. James Phillippe
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