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.13.202.144 with SMTP id m138mr3122983ywd.19.1435342919731; Fri, 26 Jun 2015 11:21:59 -0700 (PDT) X-Received: by 10.182.209.6 with SMTP id mi6mr23685obc.27.1435342919671; Fri, 26 Jun 2015 11:21:59 -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!feeder.erje.net!1.eu.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!z60no64941qgd.0!news-out.google.com!a16ni5472ign.0!nntp.google.com!m20no109442iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 26 Jun 2015 11:21:59 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.203.194.21; posting-account=bXcJoAoAAAAWI5APBG37o4XwnD4kTuQQ NNTP-Posting-Host: 74.203.194.21 References: <249bcd57-3074-4566-b8f2-03e6923bfbce@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6a104bde-67ea-48a5-a035-6be3f9235d42@googlegroups.com> Subject: Re: Fixed-point question From: Patrick Noffke Injection-Date: Fri, 26 Jun 2015 18:21:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26486 Date: 2015-06-26T11:21:59-07:00 List-Id: 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. Pat