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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6609c40f81b32989 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder2.news.weretis.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Why is Ada considered "too specialized" for scientific use Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Mon, 5 Apr 2010 13:20:10 +0200 Message-ID: <6dwpeaukzojp.8bia3ljfrzu3$.dlg@40tude.net> NNTP-Posting-Date: 05 Apr 2010 13:20:17 CEST NNTP-Posting-Host: 83f49ba1.newsspool3.arcor-online.net X-Trace: DXC=ZMAG7>aW[\MI7\_^6>c20JMcF=Q^Z^V3H4Fo<]lROoRA8kF On Mon, 5 Apr 2010 02:09:53 -0700 (PDT), mockturtle wrote: > Back to the main topic, maybe the only defect of Ada in number > crunching is the lack > of some extensive numerical library (but it does not seem to me that > C, C++ or Java are especially good on this...) There is a problem specific to Ada. A quality Ada library should deal with all real types. (Other languages do not have this problem because they are too primitive.) Technically this results in a bunch of generic packages instantiated with some actual real type. Apart from being quite boring for a user this approach has numerical problem. How would you specify and provide the accuracy for all possible precisions, implicitly defined by the formal parameter T? Say, the function f(X) should yield the result accurate within T'Small or, maybe, within [f(X)'Pred, f(X)'Succ] etc. The accuracy should depend on the precision. You also would certainly need some type larger than T'Base in order to carry out intermediate calculations. How would you get such a type in a generic unit? Ada is an excellent language for number crunching by C's or FORTRAN's standards. But this is not good enough by the standard of its own. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de