From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d402aef7676f64a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s72.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Comparing Floating Point Values References: <1166026474.277616.267400@f1g2000cwa.googlegroups.com> In-Reply-To: <1166026474.277616.267400@f1g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s72 1166040155 12.201.97.213 (Wed, 13 Dec 2006 20:02:35 GMT) NNTP-Posting-Date: Wed, 13 Dec 2006 20:02:35 GMT Date: Wed, 13 Dec 2006 20:02:36 GMT Xref: g2news2.google.com comp.lang.ada:7908 Date: 2006-12-13T20:02:36+00:00 List-Id: markp wrote: > I was wondering if there was a convention for comparing 2 floats > dealing with significant digits. For example, if I had 2 variables (x > and y) and wanted to see if they were equal in an if statement, is > there a standard way to do a compare based on "x" significant digits? You might want to consider the attribute 'Model_Epsilon. -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail 15