Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: Float Pt Precision
Date: Thu, 29 Jul 1999 14:47:33 -0500	[thread overview]
Message-ID: <37A0AFD5.29089BFC@paralleldata.com> (raw)
In-Reply-To: m2k8rj8f1v.fsf@blinky.bfr.co.il

"Harvey J. Stein" wrote:
> 
> "Michael J. Donahue" <donahue@saaz.cam.nist.gov> writes:
> 
>  > The difference in the floating point calculations on the x86 vs the
>  > Alpha trace back to the hardware implementations.  The extra
>  > precision in the x86 makes life much easier---it narrows the window
>  > of numerical instability in almost every situation.
> 
> Can you substantiate this?  I've found x86 arithmetic to be
> substantially harder to work with because the excess precision shows
> up unpredicably.  After setting two different variables via the same
> computation it's possible for the two variables to be not equal.  It
> depends on exactly what goes into registers when.  This problem
> doesn't exist on the alphas.
> 

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.


Wes


  reply	other threads:[~1999-07-29 19:46 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 [this message]
1999-07-29 21:05           ` Harvey J. Stein
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