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!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 08 May 2006 16:19:19 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Ada decimal types Date: Mon, 8 May 2006 16:19:43 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: <8KadnYXCB-5FKMLZnZ2dneKdnZydnZ2d@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-kYH3wZu2qvgTMfoR4p9fcB6wLR9ptEP856U3Dma6mSeOgF2utYmtR8+AAfwOeI+uF5okzo1nx6lQQQM!C7FymTJnEz1zzYgjtbDsLX9ez6PGft4adkZ75EAmAtBh8Fhzog4n0eUU9Kt2LVJtAUwqkta9v/XH!2sUkiU1wsZf1FA== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:4143 Date: 2006-05-08T16:19:43-05:00 List-Id: "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; other than the bounds of the base type and the rounding of the "*" and "/" operations. The *precision* is identical, because that depends *only* on the value of 'small [for all fixed point types], and that is the same for both of these types. [There might be representation differences, but those can't change the semantics of the types.] Of course, specifying the small is necessary to get the appropriate precision for the ordinary fixed point type (as the default is not what you want). But that is always a good idea with fixed point; it's too important of a choice to leave it to the compiler, and it is best to document it explicitly in the source code. Randy.