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,67d995bf9f62ea45 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: matrix package with Ada Date: Mon, 19 Jul 2010 17:34:25 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <23f0d8f1-e7bd-4af9-a0ee-cea85cbff4bd@x21g2000yqa.googlegroups.com> <8f4ba975-5441-4b42-89ad-b53373a59eb9@g19g2000yqc.googlegroups.com> <53250ca8-da19-47a9-a9b1-3cd1653fb05f@y4g2000yqy.googlegroups.com> <3dd1b818-4ab0-495f-97c5-8f59035d71a4@d37g2000yqm.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1279578868 534 69.95.181.76 (19 Jul 2010 22:34:28 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 19 Jul 2010 22:34:28 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:12471 Date: 2010-07-19T17:34:25-05:00 List-Id: "Ada novice" wrote in message news:ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com... ... > A friend uses F# for numerics and here also eigenvalue computation > exists only for symmetric matrices as in Ada 05. I hope that in the > next next Ada release, there would be more numeric facilities. As far as I know, we haven't had a single request for more numeric facilities in Ada 2012, and I'm pretty sure that there are no open requests for the same. If you want to see additional facilities, you need to ask (on Ada-Comment) and give examples of problems that you have that can't be solved with the current facilities. (Even better, would be to actively participate in the language revision process; we don't have enough numerics expertise to do a great job.) In any case, the eigenvalue routines originally were supposed to work on all matrices. That was dropped as the algorithms to solve such things are supposedly suspect. Here's the discussion from AI95-0296-1 (which defines the G.3 packages): We considered providing subprograms for the determination of eigenvalues and eigenvectors of general real and complex matrices. Such matrices can have complex eigenvalues and therefore provision for these would have to be in the complex package. However, there are mathematical difficulties with these general cases which are in strong contrast to the real symmetric and Hermitian matrices. Thus, Numerical Recipes by Press, Flannery, Teukolsky and Vetterling says regarding the real case: "The algorithms for symmetric matrices ... are highly satisfactory in practice. By contrast, it is impossible to design equally satisfactory algorithms for the nonsymmetric case. There are two reasons for this. First, the eigenvalues of a nonsymmetric matrix can be very sensitive to small changes in the matrix elements. Second, the matrix itself can be defective so that there is no complete set of eigenvectors. We emphasize that these difficulties are intrinsic properties of certain nonsymmetric matrices, and no numerical procedure can cure them." Similar remarks apply to complex matrices where Hermitian matrices are well-behaved but non-Hermitian matrices can be troublesome. In view of these computational difficulties and the fact that requiring the eigensystem of general matrices is uncommon, we decided not to provide such facilities. [End of quote from AI95-0296-1.] I recall that the situation is actually worse than reported here; some of the algorithms used may not terminate for some matricies. Algorithms that don't terminate aren't tolerable in the Ada predefined libraries! I am no expert on numerics, but I have to wonder what other languages and/or packages do in such cases? Perhaps they just don't care (there is precedent for that; Ada takes great pains to define the accuracy of most of the numerical functions, most other languages say nothing at all). Clearly, this problem would need to be solved in some way before a general routine could in introduced (of course, the abstract above seems to imply that such a solution is impossible). Randy.