C Library Functions  - crotg (3)

NAME

crotg(3f) - [BLAS:SINGLE_BLAS_LEVEL1] Generate a hermitian Given’s rotation.

CONTENTS

Synopsis
Description
Options
Authors
Contributors
Further Details
See Also

SYNOPSIS

subroutine CROTG( a, b, c, s )

     .. Scalar Arguments ..
        complex(wp),intent(inout) :: a
        complex(wp),intent(in)    :: b
        real(wp),intent(out)      :: c
        complex(wp),intent(out)   :: s

DESCRIPTION

CROTG constructs a plane rotation

     [  c         s ] [ a ] = [ r ]
     [ -conjg(s)  c ] [ b ]   [ 0 ]

where c is real, s ic complex, and c**2 + conjg(s)*s = 1.

The computation uses the formulas

    |x| = sqrt( Re(x)**2 + Im(x)**2 )
    sgn(x) = x / |x|  if x /= 0
           = 1        if x  = 0
    c = |a| / sqrt(|a|**2 + |b|**2)
    s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2)

When a and b are real and r /= 0, the formulas simplify to

    r = sgn(a)*sqrt(|a|**2 + |b|**2)
    c = a / r
    s = b / r

the same as in CROTG when |a| > |b|. When |b| >= |a|, the sign of c and s will be different from those computed by CROTG if the signs of a and b are not the same.

OPTIONS

A On entry, the scalar a. On exit, the scalar r.
B The scalar b.
C The scalar c.
S The scalar s.

AUTHORS

o Edward Anderson, Lockheed Martin

CONTRIBUTORS

o Weslley Pereira, University of Colorado Denver, USA

FURTHER DETAILS

Anderson E. (2017) Algorithm 978: Safe Scaling in the Level 1 BLAS ACM Trans Math Softw 44:1--28 https://doi.org/10.1145/3061665

SEE ALSO

Online html documentation available at http://www.netlib.org/lapack/explore-html/


Nemo Release 3.1 crotg (3) July 22, 2023
Generated by manServer 1.08 from 17b95912-c045-425d-929e-9721f88e6e26 using man macros.