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,acba876b1e3c9639 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps90.POSTED!023a3d7c!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: GNAT Optimization of Constant Expressions References: <1179355028.624745.258370@q75g2000hsh.googlegroups.com> <464cb4cd$1_3@news.bluewin.ch> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 18 May 2007 16:25:14 GMT NNTP-Posting-Host: 208.66.252.228 X-Trace: edtnps90 1179505514 208.66.252.228 (Fri, 18 May 2007 10:25:14 MDT) NNTP-Posting-Date: Fri, 18 May 2007 10:25:14 MDT Xref: g2news1.google.com comp.lang.ada:15832 Date: 2007-05-18T16:25:14+00:00 List-Id: "Randy Brukardt" writes: > One example is: > Y := (X - 0.5) - 0.5; > > You might think that replacing this with > Y := X - 1.0; > would be a good idea, but actually it reduces the accuracy of the result I don't understand this. Both 0.5 and 1.0 have "exact" binary representations right? Can you give a value of X where this would hold? -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.