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!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!news-east.rr.com!news-feed-01.rdc-kc.rr.com!news.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!tornado.socal.rr.com.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada decimal types References: <8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net> From: Keith Thompson Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:XtNGc4DIW9odQLo1m8RH6/LSJL8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 May 2006 01:08:43 GMT NNTP-Posting-Host: 66.75.136.120 X-Complaints-To: abuse@rr.com X-Trace: tornado.socal.rr.com 1147223323 66.75.136.120 (Tue, 09 May 2006 18:08:43 PDT) NNTP-Posting-Date: Tue, 09 May 2006 18:08:43 PDT Organization: Road Runner High Speed Online http://www.rr.com Xref: g2news2.google.com comp.lang.ada:4167 Date: 2006-05-10T01:08:43+00:00 List-Id: "REH" writes: > "Randy Brukardt" wrote in message > news:8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net... >> >> "REH" wrote in message >> news:yj47g.23728$ZQ3.20636@twister.nyroc.rr.com... >> ... >> Also, duration is a binary fixed point. >>> A don't want to use those because precision may be lost. Whether or not >> the >>> loss will be an issue, I do not know but I would rather not risk it. Of >>> course I just may be worrying over nothing. >> >> 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? Um, no. The delta is exactly what's specified in the type declaration. Given: type Mission_Time_Type is delta 1.0e-6 range 0.0 .. (2.0**32) - 1.0; the delta is 1.0e-6. In the absence of a representation clause for 'Small, the default Small is a power of 2, but in this case the Small was explicitly specified: for Mission_Time_Type'Small use 1.0e-6; so the Small is also exactly 1.0e-6. -- Keith Thompson (The_Other_Keith) kst-u@mib.org San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.