Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: hjstein@bfr.co.il (Harvey J. Stein)
To: axp-list@redhat.com
Cc: hjstein@bfr.co.il
Subject: Re: Float Pt Precision
Date: 30 Jul 1999 00:05:20 +0300	[thread overview]
Message-ID: <m2hfmn88vj.fsf@blinky.bfr.co.il> (raw)
In-Reply-To: "Wes Bauske"'s message of "Thu, 29 Jul 1999 14:47:33 -0500"

"Wes Bauske" <wsb@paralleldata.com> writes:

 > Just a programming style hint. Never do "if(fpval1 == fpval2)".
 > Alway do "if(ABS(fpval1-fpval2) < epsilon)". Pick an epsilon that
 > makes sense for your algorithm and the machine it's running on.

This isn't the place to get into a discussion about this.  Let me just
say that in general when you have higher precision registers then 1)
using tolerances don't always help and 2) reordering & different
optimization levels can significantly change results.  There was a
long discussoin of this on the egcs mailing list.

-- 
Harvey J. Stein
Bloomberg LP
hjstein@bfr.co.il


  reply	other threads:[~1999-07-29 21:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-29 13:24 Float Pt Precision Uncle George
1999-07-29 14:03 ` Alvin Starr
1999-07-29 14:32   ` Phil Carmody
1999-07-29 15:57     ` Michael J. Donahue
1999-07-29 18:51       ` Harvey J. Stein
1999-07-29 19:47         ` Wes Bauske
1999-07-29 21:05           ` Harvey J. Stein [this message]
1999-07-29 21:07         ` Michael J. Donahue
1999-07-29 14:17 ` Phil Carmody
1999-07-29 14:24 ` Christopher C Chimelis
1999-07-29 16:39 ` Wes Bauske
1999-07-29 23:42 ` Richard Henderson
1999-07-30 13:19   ` Harvey J. Stein
1999-07-30 14:38     ` Uncle George
1999-07-30 14:55   ` Uncle George
1999-07-30 11:18 ` Phil Carmody
1999-07-30 14:52   ` Uncle George
1999-07-30 15:31     ` Phil Carmody
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