diff options
author | langou <langou@users.noreply.github.com> | 2014-06-16 12:16:58 +0000 |
---|---|---|
committer | langou <langou@users.noreply.github.com> | 2014-06-16 12:16:58 +0000 |
commit | c911488e784d7373d5fd32f760755f22b4c2f72a (patch) | |
tree | 1fe9d3979061eb899132d14e4a0cb69ba6c132f5 | |
parent | 54a506304c4b81e8f2ce03a11356e25b74688b4c (diff) |
bug found by Themos Tsikas fron NAG Ltd
LAPACK FORUM topic #4558
Hello
In zlanhf.f, first executable statements
Code: Select all
IF( N.EQ.0 ) THEN
ZLANHF = ZERO
RETURN
ELSE IF( N.EQ.1 ) THEN
ZLANHF = ABS(A(0))
RETURN
END IF
When N=1, we should be ignoring any imaginary part (as we do for general diagonal elements later on) and so it should read
Code: Select all
IF( N.EQ.0 ) THEN
ZLANHF = ZERO
RETURN
ELSE IF( N.EQ.1 ) THEN
ZLANHF = ABS(DBLE(A(0)))
RETURN
END IF
Themos Tsikas
NAG Ltd
-rw-r--r-- | SRC/clanhf.f | 2 | ||||
-rw-r--r-- | SRC/zlanhf.f | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/SRC/clanhf.f b/SRC/clanhf.f index f7bd4fb5..cbcb7ece 100644 --- a/SRC/clanhf.f +++ b/SRC/clanhf.f @@ -286,7 +286,7 @@ CLANHF = ZERO RETURN ELSE IF( N.EQ.1 ) THEN - CLANHF = ABS( A(0) ) + CLANHF = ABS(REAL(A(0))) RETURN END IF * diff --git a/SRC/zlanhf.f b/SRC/zlanhf.f index 8f781dd7..99b3f3c1 100644 --- a/SRC/zlanhf.f +++ b/SRC/zlanhf.f @@ -286,7 +286,7 @@ ZLANHF = ZERO RETURN ELSE IF( N.EQ.1 ) THEN - ZLANHF = ABS( A(0) ) + ZLANHF = ABS(DBLE(A(0))) RETURN END IF * |