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-29 11:31:18 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.news2me.com!sn-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why no 'Floor for fixed point types Date: Wed, 29 Oct 2003 13:29:37 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3F99FBE1.1030601@comcast.net> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:1819 Date: 2003-10-29T13:29:37-06:00 List-Id: "Nick Roberts" wrote in message news:bnmcoj$12vsv7$1@ID-25716.news.uni-berlin.de... > > 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? I hope not, or I'll be out of the compiler business. (Redoing all of the generic support in Janus/Ada is out of the question.) > Do you think fixed point types should have a Floor attribute? The original answer to this showed that for some fixed point types, it wouldn't be possible to implement it accurately. Thus, it is much better to show what you are doing via a conversion to an appropriate float type. Hopefully the compiler can note the easy cases and eliminate the float operations. Randy.