Correct a bug found by Ashutosh Mahajan from Mathematics and Computer Science Divisio...
authorlangou <langou@users.noreply.github.com>
Wed, 16 Dec 2009 01:58:23 +0000 (01:58 +0000)
committerlangou <langou@users.noreply.github.com>
Wed, 16 Dec 2009 01:58:23 +0000 (01:58 +0000)
commitacbecfd1b8138025a4e57c510e5673711465af48
treefa1311fbfab0235eed48dadec2286cd7c9d08737
parentecf41ea0c0ac83c20b0f4268bc4ca1e4b3ff9663
Correct a bug found by Ashutosh Mahajan from Mathematics and Computer Science Division of Argonne National Labs.
Email sent on Thu, 10 Dec 2009 16:53:57 to lapack@cs.utk.edu.

I think we have a bug in dstemr.f for the case when N is 2. The following
block:

392:                   IF (CS.NE.ZERO) THEN
393:                      ISUPPZ(2*M-1) = 1
394:                      ISUPPZ(2*M-1) = 2
395:                   ELSE
396:                      ISUPPZ(2*M-1) = 1
397:                      ISUPPZ(2*M-1) = 1
398:                   END IF

should really be (note lines 394, 397):

392:                   IF (CS.NE.ZERO) THEN
393:                      ISUPPZ(2*M-1) = 1
394:                      ISUPPZ(2*M) = 2
395:                   ELSE
396:                      ISUPPZ(2*M-1) = 1
397:                      ISUPPZ(2*M) = 1
398:                   END IF

similarly the block:
415:                IF (SN.NE.ZERO) THEN
416:                   IF (CS.NE.ZERO) THEN
417:                      ISUPPZ(2*M-1) = 1
418:                      ISUPPZ(2*M-1) = 2
419:                   ELSE
420:                      ISUPPZ(2*M-1) = 1
421:                      ISUPPZ(2*M-1) = 1
422:                   END IF
423:                ELSE

should really be (note lines 418, 421):

415:                IF (SN.NE.ZERO) THEN
416:                   IF (CS.NE.ZERO) THEN
417:                      ISUPPZ(2*M-1) = 1
418:                      ISUPPZ(2*M) = 2
419:                   ELSE
420:                      ISUPPZ(2*M-1) = 1
421:                      ISUPPZ(2*M) = 1
422:                   END IF
423:                ELSE
SRC/dstemr.f
SRC/sstemr.f