Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Heinz Ulrich Stille <Heinz.Ulrich.Stille@mbi-os.de>
To: axp-list@redhat.com
Subject: Re: Floating point problems
Date: Sat, 28 Nov 1998 14:58:51 +0100	[thread overview]
Message-ID: <98112815063308.07172@apollo.bcas.de> (raw)
In-Reply-To: 366007B6.205A50C0@neuro.uni-oldenburg.de

Hi!

On Sat, 28 Nov 1998, Johannes G.D. Hausmann wrote:
>> main() {
>>         double x = 1.0;
>>         x *= 1e-310;
>> }
>> 
>
>This is a denormal. From float.h:
>
>   /* Minimum normalised double */
>#undef DBL_MIN
>#define DBL_MIN 2.2250738585072014e-308

This does not seem to be the problem: I get the same results with
	double a = 1.0, b = 1e-310, c = a * b; printf("%lg\n", c):
This gives `1e-310' on intel, but an error on alpha.
OTOH, might it be related to storing the value? I get the same error
with { double a = 1e-310; float b = a; }, instead of zero like on
intel, but I get no error when I switch the values around in the
first example (didn't check wheter the compiler is cheating and
am away from my alpha at the moment).

MfG, Ulrich

--
"Never trust any ruler who puts his faith in tunnels and bunkers and escape
routes. The chances are that his heart isn't in the job."
                                           T. Pratchett, "Guards! Guards!"


  reply	other threads:[~1998-11-28 14:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-28 13:15 Floating point problems Heinz Ulrich Stille
1998-11-28 14:24 ` Johannes G.D. Hausmann
1998-11-28 13:58   ` Heinz Ulrich Stille [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
1998-11-30  8:16 y0000218
1998-11-30  9:08 ` 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
1998-11-30 10:24 y0000218
1998-11-30 13:30 ` Alvin Starr
1998-12-03  0:48   ` Richard Henderson
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