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: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Modify value - type duration References: <7ef68540-6df1-4e47-b425-ab08c03f2db9@p31g2000prf.googlegroups.com> <6f0d9434-9489-4946-b29f-60957c83858c@w1g2000prk.googlegroups.com> In-Reply-To: <6f0d9434-9489-4946-b29f-60957c83858c@w1g2000prk.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1225936659 12.201.97.213 (Thu, 06 Nov 2008 01:57:39 GMT) NNTP-Posting-Date: Thu, 06 Nov 2008 01:57:39 GMT Organization: AT&T ASP.att.net Date: Thu, 06 Nov 2008 01:57:39 GMT Xref: g2news1.google.com comp.lang.ada:2592 Date: 2008-11-06T01:57:39+00:00 List-Id: 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. -- Jeff Carter "You a big nose have it." Never Give a Sucker an Even Break 107