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,cc6a4bc415a41111 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.46.193 with SMTP id x1mr20521096pbm.7.1317293388810; Thu, 29 Sep 2011 03:49:48 -0700 (PDT) Path: lh7ni7442pbb.0!nntp.google.com!news1.google.com!postnews.google.com!k10g2000vbn.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: fixed point vs floating point Date: Thu, 29 Sep 2011 03:49:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <440acd0c-f6ca-4c24-a8ae-3c5dbf71467c@dm9g2000vbb.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 X-Trace: posting.google.com 1317293388 14472 127.0.0.1 (29 Sep 2011 10:49:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 29 Sep 2011 10:49:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k10g2000vbn.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0,gzip(gfe) Xref: news1.google.com comp.lang.ada:18193 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-09-29T03:49:48-07:00 List-Id: 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 type Real is private; with function "+" (Left, right: Real) return Real; ... package Numerics is