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,c1bdceb867926fdb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!o19g2000yqb.googlegroups.com!not-for-mail From: Ada novice Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada with C Date: Fri, 6 Aug 2010 05:04:51 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <06eb8f61-2a0c-4dda-93f3-8414d32b6e4f@f20g2000pro.googlegroups.com> <87pqxwrwtz.fsf@hugsarin.sparre-andersen.dk> <1t7qv7gn9gugg$.alpj3tkmkw1y$.dlg@40tude.net> <26c3cae1-3a8d-4843-90e9-10bdbbd09caa@i24g2000yqa.googlegroups.com> <150fz7r9jrcf6$.1gcjw5ap4ul9p$.dlg@40tude.net> NNTP-Posting-Host: 193.11.22.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1281096292 18288 127.0.0.1 (6 Aug 2010 12:04:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 6 Aug 2010 12:04:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o19g2000yqb.googlegroups.com; posting-host=193.11.22.91; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12908 Date: 2010-08-06T05:04:51-07:00 List-Id: On Aug 6, 11:51=A0am, "Dmitry A. Kazakov" wrote: > > Because it does not tell anything about My_Float. When you declare a > subtype you should have a reason for it. The only reason is putting a > constraint on it. (Another might be type renaming, but that is an Ada > kludge) > > > What about "type My_Float is digits 18" as Jacob Sparre Andersen said > > in an earlier message? > > If you wanted a type of defined accuracy. > > It depends on what you want to achieve: > > 1. Constraining -> Subtype > > 2. Requiring certain accuracy/precision -> Type > > 3. Interfacing -> A type from some library package like Interfaces.C > > 4. Separation of domains (e.g. measurement units etc) -> Type > > 5. Type extension, reimplementation -> type T is private; and in the > private part: type T is new Float; > > > But sjw in an earlier message > > mentions that the "internals of the matrix operations only use 64 > > bits. So in any case then asking for more than Long-Float precision is > > not "relevant". > > That would be the case 3. > Thanks for the explanations. YC