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,67d995bf9f62ea45 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e30g2000vbl.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: matrix package with Ada Date: Tue, 27 Jul 2010 15:10:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7594c659-3d67-427d-9c0e-10531d979fa0@e30g2000vbl.googlegroups.com> References: NNTP-Posting-Host: 143.117.23.233 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1280268610 25590 127.0.0.1 (27 Jul 2010 22:10:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 27 Jul 2010 22:10:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e30g2000vbl.googlegroups.com; posting-host=143.117.23.233; 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/2010062510 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12617 Date: 2010-07-27T15:10:10-07:00 List-Id: I found another bug in Generic_Complex_Eigenvalues. (From the collection at http://www.csee.umbc.edu/~squire/adaclass/gnatmath95/). Wherever you find 2.0**( -23) in the code, it should be replaced with Acc_Init, where Acc_Init : constant Real := Real'Epsilon * 2.0**(-3); -- 2**(-23) for digits 6, and 2**(-53) for digits 15, assuming usual IEEE. At the moment Generic_Complex_Eigenvalues only gives you single precision (digits 6), so it fails as a generic in the floating point type Real. Also the program works poorly on matrices that are ill-conditioned, and it fails catastrophically on singular matrices. There is still a large class of problems where it may be useful, but its limitations should be loudly stated somewhere in .ads file. J.