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,31c8255073b2d349 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!d8g2000yqf.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions, 20100901 release Date: Sat, 4 Sep 2010 17:32:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <513c30f4-55f7-49de-8b17-9f932e726f36@d8g2000yqf.googlegroups.com> References: <889c1e51-cd27-4e7e-b5ae-b9e2c1c5b644@u6g2000yqh.googlegroups.com> <5c42e8bf-b12d-4c92-9eb6-5b056832352a@l20g2000yqe.googlegroups.com> NNTP-Posting-Host: 143.117.23.126 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1283646780 12118 127.0.0.1 (5 Sep 2010 00:33:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 5 Sep 2010 00:33:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d8g2000yqf.googlegroups.com; posting-host=143.117.23.126; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19) Gecko/2010072022 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13951 Date: 2010-09-04T17:32:57-07:00 List-Id: On Sep 4, 12:12=A0pm, Ada novice wrote: > I tried compiling test_extensions.adb but I get an error message: > > =A0 =A0 20. with Ada.Numerics.Generic_Complex_Arrays; > =A0 =A0 21. with Ada.Numerics.Generic_Arrays; > =A0 =A0 =A0 =A0 =A0 =A0 =A0| > =A0 =A0 =A0 =A0 >>> "Ada.Numerics.Generic_Arrays" is not a predefined lib= rary > unit > > ... > YC Don't worry, I got the same error message, knew I would not be smart enough to fix it, and just replaced all the dots with underscores. Now my version is named ada_numerics_generic_arrays.adb I got around to attaching my suite of test matrices to the new LAPACK binding. A few rambling observations.. First the good news is that the binding seems to work the way it's supposed to .. no problems to report there. This is good news because it is much easier to fill in missing LAPACK routines now that Simon has shown us how to do it. In particular I seem to recall that you (YC) requested a routine for generalized Eigen systems: A*v =3D lambda*B*v for matrices A and B. That should be easy to add to the present interface. The not-so-good news is that I tested Lapack's eigendecomposition for real general (non-symmetric) matrices, dgeev, and I was surprized to see it fail catastrophically on 3 or 4 matrices in the test suite, and perform poorly on another 7 or 8. It worked fine on small matrices (N x N =3D 16 x 16) but degraded rapidly for larger N, so I don't think I am misinterpreting the test results. This was so surprizing I dusted off an Ada translation of the ancient EISPACK hqr2.f I did a while ago. It never worked very well either, so I decided to throw out the EISPACK Hessenberg reduction and replace it with one based on Givens rotations. Now it works correctly on all the matrices in the test suite. I've tested it up to 2901 x 2901 matrices without problem (it took mere 18.3 hours on 60 matrices). I've always liked Givens rotations! The package is called Peters_Eigen, (after the original author) and I put it in a public directory: http://web.am.qub.ac.uk/users/j.parker/miscellany/eig_stuff/ It's quickly written and lightly tested, but you may want to play with it... instructions for compiling the test/ demo routine peters_eigen_test_1.adb with gnatmake on the command line are in the README ... no LAPACK, very easy. I did a test on 787 x 787 matrices comparing LAPACK with Peters_Eigen. Results are in the file bench1.txt in the public directory. The LAPACK test procedure is identical to the Peters_Eigen test procedure. The LAPACK run took 550 seconds on the 60 matrices. Peters_Eigen took 676 seconds. J.