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-Thread: 103376,cc6a4bc415a41111 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.8.135 with SMTP id r7mr39405194pba.8.1317303485437; Thu, 29 Sep 2011 06:38:05 -0700 (PDT) Path: lh7ni7524pbb.0!nntp.google.com!news1.google.com!postnews.google.com!u13g2000vbx.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: fixed point vs floating point Date: Thu, 29 Sep 2011 06:38:04 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6fd87b99-e9d4-44c0-9dc5-9c842ed7e9d7@u13g2000vbx.googlegroups.com> References: <440acd0c-f6ca-4c24-a8ae-3c5dbf71467c@dm9g2000vbb.googlegroups.com> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 X-Trace: posting.google.com 1317303485 23328 127.0.0.1 (29 Sep 2011 13:38:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 29 Sep 2011 13:38:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u13g2000vbx.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCFNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0,gzip(gfe) Xref: news1.google.com comp.lang.ada:18196 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-09-29T06:38:04-07:00 List-Id: On Sep 29, 11:49=A0am, AdaMagica wrote: > Unfortunately, fixed and floating point are separate categories of > real types, so there is no generic formal that can serve both. > > You have to make the type private and supply all numeric operations > like this: > > generic > =A0 type Real is private; > =A0 with function "+" (Left, right: Real) return Real; > =A0 ... > package Numerics is Is there a means of determining that 'Real' isn't an integer type?...I can't think of one...other than using ASIS. Could AdaControl spot this? -- Martin