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,16dbd7ecc6a3d50c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada decimal types Date: Wed, 10 May 2006 06:37:46 +0100 Organization: Pushface Message-ID: References: <8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1147239467 10837 62.49.19.209 (10 May 2006 05:37:47 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 10 May 2006 05:37:47 +0000 (UTC) Cancel-Lock: sha1:qOjTRuyOtRTLdBtBI3V/7GwvLO0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:4168 Date: 2006-05-10T06:37:46+01:00 List-Id: "REH" writes: > "Randy Brukardt" wrote in message > news:8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net... >> You're still very confused. Semantically, there is no difference between >> >> type Mission_Time_Type is delta 1.0e-6 range 0.0 .. (2.0**32) - 1.0; >> for Mission_Time_Type'Small use 1.0e-6; >> >> and >> >> type Mission_Time_Type is delta 1.0e-6 digits 14; > > Why is there not a difference? Won't the first actually use some negative > power-of-2 as the delta? The LRM 3.5.10(2) is a good deal less than informative as to what this _Small_ might be. But unless I have been totally wrong all this time it specifies the value of the LSB of the type. So for Randy's example, if you do an unchecked conversion of Mission_Type_Time'(1.5) to a long integer, the result would be 1_500_000. And if you did the same for a GNAT Duration'(1.5) -- remember, its 'Small is 1e-9) -- you would get 1_500_000_000.