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: a07f3367d7,6fabd104d18f3943 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!aioe.org!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: conversions between fixed-point types Date: Sat, 19 Sep 2009 18:38:17 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: +ERTOT2Y9KJRZ8n+NpAZGA.user.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.0 X-Newsreader: Tom's custom newsreader Cancel-Lock: sha1:jKfG9534JGTh4Bq6xVARGM0qzOM= Xref: g2news2.google.com comp.lang.ada:8398 Date: 2009-09-19T18:38:17+00:00 List-Id: > And, while experimenting and trying out Adam Beneschan's solution for > rounding (thanks for your answer, Alan) I got totally confused because > of the following code (I am using GNAT 4.3.4 with the following > command line options: gnatmake -f -gnatVa -gnata -gnatwadhl.o > -save-temps conversion.adb): (For your convenience, I added the results > as comments within the code.) Using rather old versions of two compilers, I get: Gnat 3.15p Janus 3.1.2a -1.50000E+00 -1.50000E+00 -1.20000E+00 -1.60000E+00 -1.20000E+00 -1.60000E+00 -1.60000E+00 -1.60000E+00 -1.20000E+00 -1.60000E+00 -1.20000E+00 -1.60000E+00 -1.60000E+00 -1.60000E+00 -1.60000E+00 -1.60000E+00