diff options
author | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2012-04-11 01:50:07 +0000 |
---|---|---|
committer | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2012-04-11 01:50:07 +0000 |
commit | c254495b4de7667073f941bdfe89f8325c66687b (patch) | |
tree | 3f7ceda8c608e0a9f2cf235a8b2059719b3ca40b | |
parent | 1b5afc4229b27adcfb5a1f761e308710ff4c7d56 (diff) | |
download | lapack-c254495b4de7667073f941bdfe89f8325c66687b.tar.gz lapack-c254495b4de7667073f941bdfe89f8325c66687b.tar.bz2 lapack-c254495b4de7667073f941bdfe89f8325c66687b.zip |
added code to handle N=1 case to fix divide by zero problem that occurs
when the single (diagonal) element is negative
see: http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01195.html
-rw-r--r-- | SRC/clanhf.f | 3 | ||||
-rw-r--r-- | SRC/dlansf.f | 3 | ||||
-rw-r--r-- | SRC/slansf.f | 3 | ||||
-rw-r--r-- | SRC/zlanhf.f | 3 |
4 files changed, 12 insertions, 0 deletions
diff --git a/SRC/clanhf.f b/SRC/clanhf.f index af5c16f8..988cd708 100644 --- a/SRC/clanhf.f +++ b/SRC/clanhf.f @@ -286,6 +286,9 @@ IF( N.EQ.0 ) THEN CLANHF = ZERO RETURN + ELSE IF( N.EQ.1 ) THEN + CLANHF = ABS( A(0) ) + RETURN END IF * * set noe = 1 if n is odd. if n is even set noe=0 diff --git a/SRC/dlansf.f b/SRC/dlansf.f index 761923e6..30a3f0a7 100644 --- a/SRC/dlansf.f +++ b/SRC/dlansf.f @@ -248,6 +248,9 @@ IF( N.EQ.0 ) THEN DLANSF = ZERO RETURN + ELSE IF( N.EQ.1 ) THEN + DLANSF = ABS( A(0) ) + RETURN END IF * * set noe = 1 if n is odd. if n is even set noe=0 diff --git a/SRC/slansf.f b/SRC/slansf.f index 42b03ecc..8092f16e 100644 --- a/SRC/slansf.f +++ b/SRC/slansf.f @@ -249,6 +249,9 @@ IF( N.EQ.0 ) THEN SLANSF = ZERO RETURN + ELSE IF( N.EQ.1 ) THEN + SLANSF = ABS( A(0) ) + RETURN END IF * * set noe = 1 if n is odd. if n is even set noe=0 diff --git a/SRC/zlanhf.f b/SRC/zlanhf.f index 16555823..c0d69a5c 100644 --- a/SRC/zlanhf.f +++ b/SRC/zlanhf.f @@ -286,6 +286,9 @@ IF( N.EQ.0 ) THEN ZLANHF = ZERO RETURN + ELSE IF( N.EQ.1 ) THEN + ZLANHF = ABS( A(0) ) + RETURN END IF * * set noe = 1 if n is odd. if n is even set noe=0 |