From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24747 invoked from network); 29 Jul 1999 21:05:30 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 29 Jul 1999 21:05:30 -0000 Received: from blinky.bfr.co.il (hjstein@morannon.bfr.co.il [192.116.142.129]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id RAA04948 for ; Thu, 29 Jul 1999 17:05:27 -0400 Received: (from hjstein@localhost) by blinky.bfr.co.il (8.8.5/8.6.9) id AAA24230; Fri, 30 Jul 1999 00:05:20 +0300 To: axp-list@redhat.com Subject: Re: Float Pt Precision References: <199907291557.LAA17800@saaz.cam.nist.gov> <37A0AFD5.29089BFC@paralleldata.com> CC: hjstein@bfr.co.il From: hjstein@bfr.co.il (Harvey J. Stein) Date: 30 Jul 1999 00:05:20 +0300 In-Reply-To: "Wes Bauske"'s message of "Thu, 29 Jul 1999 14:47:33 -0500" Message-ID: X-Mailer: Gnus v5.6.4/Emacs 19.34 "Wes Bauske" 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