Page 1 of 1

why does sgesvd_() fail while Matlab's svd() works?

PostPosted: Tue Feb 07, 2006 10:32 pm
by pupu79
I am wondering if anyone has had this kind of problem.

I am using CLAPACK shipped with MacOS X. For a particular matrix, CLAPACK's sgesvd_() returns NaN's in U, S and V, while Matlab's svd() returns reasonable results.

It is fairly safe to say that it is not a bug in the way I use sgesvd_(), since the code produces same result as Matlab on other matrices.

If there are some known issues about the SVD implementation in CLAPACK, I'd like to know more about it.

PostPosted: Tue Feb 07, 2006 11:56 pm
by Julien Langou
Hello,
do you use Matlab in single precision mode (available in version at least 7.1 for sure) or do you use Matlab 'natural' precision, i.e. double? If you just do svd(A) in Matlab, you are using dgesvd, if you do svd(single(A)) then you are using sgesvd.
Julien

PostPosted: Wed Feb 08, 2006 12:29 am
by pupu79
I am using svd(A) form. So I guess i can try dgesvd() to see if that is a problem with sgesvd().