LAPACK Archives

[Lapack] Error in the reference implementation of DGEMV

Hello BLAS/LAPACK people


I think I have found an error in the reference implementation of DGEMV.
The error appears in case N = 0 and BETA != 1.0. The following simple
program demonstrates the error




      DATA Y/1.0,2.0,3.0/

      DATA ALPHA/1.0/

      DATA BETA/2.0/

      WRITE (6,*) 'Before: Y = [',Y(1),',',Y(2),',',Y(3),']'

      CALL DGEMV('N',3,0,ALPHA,A,3,X,1,BETA,Y,1)

      WRITE (6,*) 'After:  Y = [',Y(1),',',Y(2),',',Y(3),']'



Before calling DGEMV, we obviously get Y = [1.0, 2.0, 3.0], whereas I
would expect Y = [2.0, 4.0, 6.0] after. However the test shows that Y is


Looking into the reference implementation of DGEMV it seems that N = 0
always causes a quick return, which I think is an error in case BETA !=
1.0. The problem is also present in the routine DGBMV, and of cause in
the corresponding single precision versions.


Thank you for doing such a wonderful job on linear algebra. This highly
appreciated and very useful.



Best regards

Erik Nim 




Erik Nim 
Garrad Hassan Denmark ApS
Pakhusvej 3, 1st Floor, DK-8382 Hinnerup, Denmark
Tel: +45 87 65 61 11 / Fax: +45 87 65 61 13 / Mobile: +45 21 65 61 08 


This email is issued subject to the Garrad Hassan email disclaimer
statement. Please refer to 
Garrad Hassan & Partners Ltd is registered in England (1878456) and has
its registered office at St Vincent's Works, Silverthorne Lane, Bristol,
BS2 0QD, UK. 


-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2699 bytes
Desc: image001.gif
Url :

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or