Under review

eigs() support for sigma = 'sa'

Joe 2 weeks ago updated by Pavel Holoborodko 1 week ago 2

I've noticed that when using advanpix data structures with eigs(), I get erroneous results when requesting the smallest eigenvalue. 

Please refer to the following code using Matlab's data structure:

A_matlab = speye(25,25); %initialize Matlab sparse identity matrix
A_matlab(13,13) = 1/3;
eigs(A_matlab,1,'sa') %request smallest eigenvalue

When running this code, I receive the following output:

ans =


Now consider a similar experiment with Advanpix:

A_advanpix = mp(speye(25,25),32); %initialize Advanpix sparse identity matrix
A_advanpix(13,13) = mp('1/3');
eigs(A_advanpix,1,'sa') %request smallest eigenvalue

When running this code, I receive the following output:  

ans = 


I have noticed if I replace '1/3' with '-1/3' in the above experiments, I obtain the correct results, namely both return "-1/3" in the appropriate precision. I appreciate any help with this issue, thank you for your assistance!

Under review

Thank you for the report, investigating...

At the moment, the "eigs" in toolbox is targeted primarily for solving unsymmetric matrices (where ill-conditioning is the most probable). Symmetric/Hermitian matrices require special handling (to keep the symmetry/Hermitian property, etc.) - but this is not implemented yet in toolbox.


This is in our TODO list for "eigs", but it needs some time to be implemented.