LAPACK Archives

[Lapack] mistake in BLAS/scabs1.f

Dear LPACK development team,

There is a mistake in the function SCABS1 in BLAS, see file BLAS/scabs1.f.
The absolute value of a complex number is not the sum of the absolute
values of its real and imaginary parts.
Either the documentation is wrong or the code is wrong.

The function SCABS1 is used only in BLAS/icamax.f. Actually, it is also
used in BLAS/caxpy.f, but in a trivial way, where it cannot cause errors.

Best,
Vitaly

*******************************
Vitaly N. Golovach
LPMMC, Maison des Magist?res CNRS
25 avenue des Martyrs, BP166
38042 Grenoble Cedex, FRANCE
Tel.: +33 4 76 88 79 82
Fax.: +33 4 76 88 79 83
Email: vitaly.n.golovach@Domain.Removed
*******************************

      REAL FUNCTION SCABS1(Z)
*     .. Scalar Arguments ..
      COMPLEX Z
*     ..
*
*  Purpose
*  =======
*
*  SCABS1 computes absolute value of a complex number
*
*  =====================================================================
*
*     .. Intrinsic Functions ..
      INTRINSIC ABS,AIMAG,REAL
*     ..
      SCABS1 = ABS(REAL(Z)) + ABS(AIMAG(Z))
      RETURN
      END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20111212/c667c6fc/attachment.html
 

<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