bug found by Themos Tsikas fron NAG Ltd
authorlangou <langou@users.noreply.github.com>
Mon, 16 Jun 2014 12:16:58 +0000 (12:16 +0000)
committerlangou <langou@users.noreply.github.com>
Mon, 16 Jun 2014 12:16:58 +0000 (12:16 +0000)
commitc911488e784d7373d5fd32f760755f22b4c2f72a
tree1fe9d3979061eb899132d14e4a0cb69ba6c132f5
parent54a506304c4b81e8f2ce03a11356e25b74688b4c
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
SRC/clanhf.f
SRC/zlanhf.f