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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6a77269912f77a70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-28 10:32:52 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!82-43-33-75.cable.ubr01.croy.blueyonder.co.UK!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Why no 'Floor for fixed point types Date: Tue, 28 Oct 2003 18:32:30 +0000 Message-ID: References: <3F99FBE1.1030601@comcast.net> NNTP-Posting-Host: 82-43-33-75.cable.ubr01.croy.blueyonder.co.uk (82.43.33.75) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1067365971 36697063 82.43.33.75 (16 [25716]) User-Agent: Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en In-Reply-To: Xref: archiver1.google.com comp.lang.ada:1782 Date: 2003-10-28T18:32:30+00:00 List-Id: Randy Brukardt wrote: > "Nick Roberts" wrote in message > news:bnen7p$vjo06$1@ID-25716.news.uni-berlin.de... > >>For a conforming compiler, there should be no rounding issues in the case >>Scale=1/Tf'Small, the division is a static expression (which should be >>calculated precisely at compile time), and I would expect the >>multiplications to be eliminated. > > > Not true if Tf is a generic formal type (and this is a common way to > implement such code). Moreover, if you use a code-sharing compiler such as > Janus/Ada, it won't be calculated at compile-time, either. Hmmmm, nasty. Is this (the non-staticness of things in generics) something that is likely to be addressed in the next revision, Randy? Do you think fixed point types should have a Floor attribute? -- Nick Roberts