summaryrefslogtreecommitdiff
path: root/SRC/dpstf2.f
AgeCommit message (Collapse)AuthorFilesLines
2016-12-23Updating version number on source file modified since 3.6.1Julie1-3/+3
This is really old school, but a lot of times we have users sending us copy pasting of codes, and that is the only way to know the version of the code.
2016-07-09STYLE: Remove trailing whitespace in Fortran filesHans Johnson1-15/+15
This is mostly a long term maintenance improvement. Many coding styles require elimination of trailing whitespace, and many editors and source code management configurations automatically gobble up whitespace. When these tools gobble up whitespace, it complicates reviewing the meaningful code changes. By removing whitespace on one patch, it makes future code reviews much easier. =SCRIPT==================================================================== if which tempfile &>/dev/null; then TEMPMAKER=tempfile elif which mktemp &>/dev/null; then TEMPMAKER=mktemp else echo "Cannot find tempfile program." 2>&1 exit 1 fi MYTEMP=$($TEMPMAKER) trap 'rm -f $MYTEMP' SIGINT SIGTERM stripit() { echo "stripping $1" sed 's/[ \t]*$//' "$1" > $MYTEMP cp $MYTEMP "$1" } if [ $# -gt 0 ]; then while [ "$1" != "" ]; do stripit $1 shift done else while read -t 2; do stripit $REPLY done fi rm $MYTEMP =================================================
2015-11-15Updating version numberjulie1-3/+3
2015-03-25**** Fix bug 124 ****langou1-4/+5
**** (I also fixed the documentation of the six subroutines **** Bug reported by Victor_K on the forum. See forum http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4643 Bug fix by Julien Langou. Involved as well Nick Higham, Sven Hammarling and Craig Lucas. ** Bug ** xPSTF2 and xPSTRF returns NaNs when the matrix in input has N negative diagonal entries. ** Note ** A matrix with N negative diagonal entries is a highly non valid input, but, yet no reason to create some NaNs, better to have a cleaner solution. ** Description ** xPSTF2 and xPSTRF first scan the diagonal of the matrix to find the greatest element on the diagonal. During this pass on the diagonal, xPSTF2/xPSTRF checks as well for ZERO or NAN on the diagonal and aborts if it finds a ZERO or a NAN on the diagonal. * * Compute stopping value * PVT = 1 AJJ = A( PVT, PVT ) DO I = 2, N IF( A( I, I ).GT.AJJ ) THEN PVT = I AJJ = A( PVT, PVT ) END IF END DO IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN RANK = 0 INFO = 1 GO TO 170 END IF Since the input matrix is filled with a negative diagonal (and no ZERO and no NAN), xPSTF2/xPSTRF finds a maximum element (which is the largest negative elements on the diagonal), and then this (negative) element is used to compute DSTOP, the stopping value. But then we get a negative DSTOP, IF( TOL.LT.ZERO ) THEN DSTOP = N * DLAMCH( 'Epsilon' ) * AJJ ELSE DSTOP = TOL END IF and then I stop even thinking on what would happen next. It seems that the code continues and does produce NAN in the first column. Why not. But I think we should catch this case and try to handle it in a different way. Maybe. ** Bug fix ** Replace IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN With IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN So that if there is any nonpositive element or any NAN on the diagonal of A, we return right away with RANK=0 and INFO=1. ** Email from Nick Higham ** [ Julien wrote ] So that if there is any nonpositive element or any NAN on the diagonal of A, we return right away with RANK=0 and INFO=1? [ Nick wrote ] I think so. This is justified by the documentation, which says INFO is INTEGER If INFO = -K, the K-th argument had an illegal value, = 0: algorithm completed successfully, and > 0: the matrix A is either rank deficient with computed rank as returned in RANK, or is indefinite. We are in the indefinite case if any diagonal element is negative. Actually, that is not quite true: we are in the "not positive definite" case. We can only say "indefinite" if there are both positive *and* negative diagonal entries! However, if that is going to be said then it would be necessary to check that all other LAPACK routines are similarly precise in their wording, so it's simplest, and not too misleading, to stay with "indefinite".
2012-09-25(no commit message)julie1-2/+2
2012-08-25(no commit message)julie1-3/+3
2012-07-03Add Brief description for auxiliary routinesjulie1-1/+1
2011-11-11Update version number to 3.4.0julie1-1/+1
2011-11-03Cosmetic changes in Doxygen presentation.julie1-13/+11
Use \par instead of \details for section. add a Contributors Section and a Reference Section. Remove (some) verbatim section when not needed. Those changes have been done by hand so I am not sure I manage to catch them all.
2011-11-01Never say never...julie1-2/+1
2011-11-01Last commit related to Doxygen integration following Albert's commentjulie1-1/+3
2011-10-13adding link to individual download, the links will appear directly in ↵julie1-0/+8
Doxygen html documentation
2011-10-06Integrating Doxygen in commentsjulie1-67/+137
2011-04-07Second and hopefully last pass to homgenize notation for transpose (**T) and ↵julie1-4/+4
conjugate transpose (**H) Corresponds to bug0024 Please take a look and let me know if you find some old notation of transpose. I am going to close bug0024. Julie
2010-06-23Update date and version for 3.2.2 releasejulie1-1/+1
2009-09-11Fix whitespace comments detected from parserjulie1-1/+1
2008-12-16(no commit message)julie1-0/+308