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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8d7393f07c06c5e9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Another question about fixed point types. Date: Sun, 29 Aug 2010 08:32:46 +0200 Organization: Ada @ Home Message-ID: References: <4c7991c8$0$2375$4d3efbfe@news.sover.net> NNTP-Posting-Host: O3zlqSZtDlsD7O4T/2P1Ww.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.61 (Win32) Xref: g2news1.google.com comp.lang.ada:13790 Date: 2010-08-29T08:32:46+02:00 List-Id: Le Sun, 29 Aug 2010 00:45:16 +0200, Peter C. Chapin a = = =C3=A9crit: > That range does not include zero. However, the > code above compiles and runs fine using GNAT GPL 2010. I have never used fixed point type in Ada (nor floats by the way, but wi= ll = do in the future for sound synthesis). However, I had a look at the reference, and here is what it says which m= ay = be relevant in your area: ARM 2005 - 3.5.9 Fixed Point Types - says: 12{base range (of a fixed point type) [partial]} The base range (see= = 3.5) of a fixed point type is symmetric around zero, except possibly for = an = extra negative value in some implementations. If it is symmetric around zero, that should explain your observations, a= s = I would be very surprised if there would be provision for a hole = somewhere. If it is symmetric around zero, and there is no two disjoint = = range, then this is include zero. A tiny test program which would write first and last of the base type ma= y = tell more. Hint: note the =E2=80=9Cpossibly for an extra negative value in some = implementations=E2=80=9D, which may be important for you as you seems to= require = deep understanding of what's going on. > P.S. The code above is a simplification of the real code, but I believ= e > it illustrates the question I have. Yes, it seems it illustrates fine. -- = =E2=80=9CDual licensing is the Perl's way to disinfect the GNU General P= ublic = Virus!=E2=80=9D (anonymous)