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,7a2d45f282a1da1c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-02 20:31:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: float with 24-bit resolution References: <3F3CCB0F.543478AF@adrianhoe.nospam.com.my> <3f405ef4$1_1@news.tm.net.my> <3f54bf19_1@news.tm.net.my> From: Matthew Heaney Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Wed, 03 Sep 2003 03:31:31 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1062559891 65.110.133.134 (Tue, 02 Sep 2003 23:31:31 EDT) NNTP-Posting-Date: Tue, 02 Sep 2003 23:31:31 EDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:42089 Date: 2003-09-03T03:31:31+00:00 List-Id: Adrian Hoe writes: > Randy Brukardt wrote: > > > > type Randys_Type is delta The_Small range -Limit+The_Small .. > > Limit-The_Small; > > "-Limit+The_Small .. Limit-The_Small" does not comply to my requirement > which the angle must be in -360.0000000 to +359.9999571. I didn't understand Randy's comment. As far as I know, the correction for T'Small is only necessary for the upper bound, not the lower bound (unless this is a 1's complement machine). Randy and I disagree about who should make the correction: the compiler or the developer. I argue that the compiler should do it, but Randy finds this confusing. YMMV. Either of the angle types defined in my post and in Simon Wright's post should work fine. Both include -360 in the range of the subtype. This issue is not unlike another convention some programmers use for initializing access objects to null: declare type T is access all Integer; Null_Object : T; --vs-- Null_Object : T := null; begin I prefer the former to the latter, because the former emphasizes that the compiler is doing some work for me. I find the latter convention confusing, because it suggests that if the initialization part were omitted, then the object wouldn't be initialized. But that would be incorrect.