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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Any good package for mathematical function in Ada? Date: Sat, 6 Jun 2020 09:06:54 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <45af26dc-c35f-4a01-8115-7b30021cc064@googlegroups.com> <835a8c6a-54a8-4157-bcf1-e889d18b1b46@googlegroups.com> <87y2p186ot.fsf@nightsong.com> NNTP-Posting-Host: 2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:58981 Date: 2020-06-06T09:06:54+02:00 List-Id: On 06/06/2020 00:54, Paul Rubin wrote: > "Dmitry A. Kazakov" writes: >> As for GMP specifically, I think that arbitrary precision numeric >> types must be an integral part of Ada. Unfortunately, this would >> introduce same mess Unbounded_String did. So, for now, I would not >> push for them until the language type system mature to accommodate >> them smoothly. > > What happened with Unbounded_String if you don't mind telling the story? > I wasn't around for it. Unbounded_String is not string and not array, end of story. > I can see why unbounded strings and numbers could be a problem for Ada, > but that's because of storage management consequences, not the type > system. No, it is the type system. Randy posted links to the drafts for unbounded integer and real. Same story. They are not numbers. As a consequence you have no conversions to/from legal numeric types, you need to instantiate generics. They do not match formal numeric types in generics. They have no attributes (some of which would have no sense anyway). In essence the problem is that numeric types have no explicit interface a private type could implement. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de