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!postnews.google.com!j73g2000cwa.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: Re: Ada decimal types Date: 10 May 2006 05:22:00 -0700 Organization: http://groups.google.com Message-ID: <1147263720.249883.220580@j73g2000cwa.googlegroups.com> References: <8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net> NNTP-Posting-Host: 192.91.173.36 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1147263725 15165 127.0.0.1 (10 May 2006 12:22:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 10 May 2006 12:22:05 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j73g2000cwa.googlegroups.com; posting-host=192.91.173.36; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news2.google.com comp.lang.ada:4174 Date: 2006-05-10T05:22:00-07:00 List-Id: Simon Wright wrote: > "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. OK, my assumption was that when they added decimal fixed points to the language, you declared them via "digits x" otherwise you would get a binary fixed point. Is that not true? REH