Hello,
i have a hermitian matrix in packed storage that I'd like to invert. I have implemented some code using chptrf/chptri, which seems to work fine for a number of test matrices (compared with matlab). In my application however the inverse obtained with these routines is often wrong (very wrong). I can unpack the matrix in to full storage and use cgesvd, no problem. Is there a restriction, which hermitian matrices this routine can invert and which not ? I have not done the work to check whether the factorization is bad or whether the inverse is bad.
Thanks, Thomas
Edit: I used a matrix from my application and factored it in matlab using ldl(). The inverse I got using that is slightly different from my svd based pseudo-inverse, but not way off, like the result from the lapack routines I get. I compared the Ds from matlab ldl() and chptrf and they look similar (well they are permuted differently), but the chptrf produced distinctively more negative values.
Edit 2: The rcond value estimated with chpcon for a problem that "fails" is 7.79277e-11
Edit 3: I added noise to improve the conditioning and now it works reasonably well, so this might be my fault after all. If I check the conditioning after chptrf, is there anything I can do to improve the conditioning/regularize the inverse ? I'm not very familiar with LDL'/UDU' decompositions, and its also baffling that the matlab ldl() routine seems to deal with this a bit better.

