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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b257fba0affa289 X-Google-Attributes: gid103376,public From: Al Christians Subject: Re: fixed type (delta) in ada Date: 1999/11/28 Message-ID: <3841B57A.42C70EC0@easystreet.com>#1/1 X-Deja-AN: 554206087 Content-Transfer-Encoding: 7bit References: <383f6dbb.22609744@news.tstonramp.com> <81pvi5$sl1$1@nnrp1.deja.com> <38409C87.69EC865@easystreet.com> <87n1rzdm4u.fsf@deneb.cygnus.argh.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: typ12.nn.bcandid.com 943830132 206.102.3.60 (Sun, 28 Nov 1999 18:02:12 EST) Organization: Trillium Resources Corporation MIME-Version: 1.0 NNTP-Posting-Date: Sun, 28 Nov 1999 18:02:12 EST Newsgroups: comp.lang.ada Date: 1999-11-28T00:00:00+00:00 List-Id: Ok. I see that there are two values in the perfect result set. No problem. I see that in the ARM. But it would be nice if the compiler would pick out the result that is more perfect, ie closer to the actual value. I see that this stuff is also leftover from Ada 83, retained to make it possible to preserve behavior of existing programs. But since the choice of values out of the possible result set is implementation dependent, that looks more like more like a broad license than a precise spec. 'This is what is expected' doesn't explain it as well as 'this is one result that is allowed'. Thanks. Next question: I haven't seen where it says that Money_Io.Put(0.20 * 351.0); Should put 68.55, which is what GNAT 3.12p does. My guess would be that 0.20 * 351.0 should be a static expression of type universal real, which should convert to type Money equal to 70.2 within +/- 0.01. Is it according to the LRM to convert both the 0.20 and 351.0 to the Money type before doing the multiply? Any other explanations? Al Florian Weimer wrote: > > Al Christians writes: > > > > No, the output should be 71.3, and this is what is expected. > > > > So, why does GNAT 3.12p give 68.55? > > That's correct as well. 0.20 can be represented as 25/128 or 26/128 > (ARM 4.6(32), G.2.3(10), G.2.3(24)).