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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.103.39 with SMTP id ft7mr4874674igb.5.1435350091480; Fri, 26 Jun 2015 13:21:31 -0700 (PDT) X-Received: by 10.140.39.165 with SMTP id v34mr52112qgv.25.1435350091347; Fri, 26 Jun 2015 13:21:31 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m20no225649iga.0!news-out.google.com!4ni2861qgh.1!nntp.google.com!j5no161904qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 26 Jun 2015 13:21:31 -0700 (PDT) In-Reply-To: <6a104bde-67ea-48a5-a035-6be3f9235d42@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.192.38; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.192.38 References: <249bcd57-3074-4566-b8f2-03e6923bfbce@googlegroups.com> <6a104bde-67ea-48a5-a035-6be3f9235d42@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Fixed-point question From: Anh Vo Injection-Date: Fri, 26 Jun 2015 20:21:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26487 Date: 2015-06-26T13:21:31-07:00 List-Id: On Friday, June 26, 2015 at 11:22:00 AM UTC-7, Patrick Noffke wrote: > On Friday, June 26, 2015 at 11:56:44 AM UTC-5, Jeffrey R. Carter wrote: > > On 06/26/2015 06:20 AM, Patrick Noffke wrote: > > > > > > type Fixed_Type is delta 1.0 / 180.0 range 0.0 .. 65535.0 / 180.0; > > > > What is Fixed_Type'Small? > > It is 1/180. > > > > > > C1 : constant Fixed_Type := Fixed_Type (N / D); > > > > What is C1'Size? > > > > If you really want to use multiples of 1/180, you probably want to do > > > > Delta_And_Small : constant := 1.0 / 180.0; > > > > type Fixed_Type is delta Delta_And_Small range 0.0 .. 65535.0 * Delta_And_Small; > > for Fixed_Type'Small use Delta_And_Small; > > > > I do that in my application. I just did the above for a simple test case. Doing as you suggest does not change the result on either platform. > It is time for a bug report. In fact, it occurs in other platforms as well. In addition, GNAT-GPL-2014 and GNAT Pro exhibit the same behavior. Anh Vo