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,1038abdfae2ba73 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Modify value - type duration Date: Thu, 6 Nov 2008 19:33:30 -0600 Organization: Jacob's private Usenet server Message-ID: References: <7ef68540-6df1-4e47-b425-ab08c03f2db9@p31g2000prf.googlegroups.com> <6f0d9434-9489-4946-b29f-60957c83858c@w1g2000prk.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1226021655 28540 69.95.181.76 (7 Nov 2008 01:34:15 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 7 Nov 2008 01:34:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:8333 Date: 2008-11-06T19:33:30-06:00 List-Id: "Jeffrey R. Carter" wrote in message news:nasQk.422242$yE1.14213@attbi_s21... > Adam Beneschan wrote: >> >> Hmmm ... now I wonder why there isn't a Truncation attribute for fixed- >> point types? Maybe nobody before Andreas ever thought they'd need >> one. Might be useful. (Also Floor, Ceiling.) > > No, I wondered about that long ago. > >> A possible problem with the floating-point conversion solution is that >> there may be cases where you lose accuracy---if, e.g., the largest >> floating-point type and fixed-point systems supported on the machine >> are both 64 bits. Since a floating-point number needs room for an >> exponent, it's possible to define a fixed-point type with more bits in >> the integer part than can be represented in the mantissa of a floating- >> point type, e.g. > > One must always be careful in such cases that the conversion will not fail > or lose important bits. Right, in both cases. Sounds like someone should propose something on Ada-Comment. (This seems like the sort of small cleanup that could be added to the next Amendment.) Randy.