|
From: | Vladimir Polishchuk |
Subject: | Fix bag in svds.m |
Date: | Tue, 06 Aug 2013 19:12:17 +0300 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
I study university with specialization Science with Mathematics Emphasis
(B. Si.) (last year) and I studied curses of programming
Java, C, Introduction
to Algorithms. And C++ but not studied that in university. And I want help to octave as a programmer and mathematician. I already look two bags in test: In svds.m: %!testif HAVE_ARPACK, HAVE_UMFPACK %! [u2,s2,v2,flag] = svds (A,k,0,opts); %! s2 = diag (s2); %! assert (flag, !1); %! tol = 10 * eps() * norm(s2, 1); %! assert (s2, s(k:-1:1), tol); Bug occurs because eigs returns more negative eigenvalues then positive if there is more then one equal singular values largest of that svds mast return. Find eigenvalues symmetric about tolerance for get positive rather than negative eigenvalues with the same magnitude - for fix bag. I fix bag the and in line: norma = normest (A); mast be b instead A and I fix the too. In num2str: %! assert (num2str (1e23), "100000000000000000000000"); I think that if the number is so large that the accuracy of the calculations not allow the unit to determine if it is integer as needs print it as a floating point. -- Vladimir Polishchuk |
cool.diff
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |