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-08-17 06:46:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.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 From: "Matthew Heaney" Newsgroups: comp.lang.ada References: <3F3CCB0F.543478AF@adrianhoe.nospam.com.my> Subject: Re: float with 24-bit resolution X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Sun, 17 Aug 2003 13:46:22 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1061127982 65.110.133.134 (Sun, 17 Aug 2003 09:46:22 EDT) NNTP-Posting-Date: Sun, 17 Aug 2003 09:46:22 EDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:41640 Date: 2003-08-17T13:46:22+00:00 List-Id: "Simon Wright" wrote in message news:x7vlltso6ld.fsf@smaug.pushface.org... > "Matthew Heaney" writes: > > > This is correct, except that you don't need to subtract the value of > > Angle_Delta when specifying the Angle'Last. The following declaration is > > perfectly correct: > > > > Angle_Delta : constant := 360.0 / 2 ** 23; > > type Angle is delta Angle_Delta range -360.0 .. 360.0; --360, not > > 360-T'Small > > for Angle'Small use Angle_Delta; > > for Angle'Size use 24; > > I suppose this is some sort of convenience offered by the compiler? or > is it the ARM? or an AI? because clearly there is no binary > representation of +360.0. You are correct that the value 360.0 is not in the range, but as a convenience the language allows you to declare it that way. This has been the language rule since Ada83. See RM95 3.5.9 (13-14 and in particular 22-24, 27).