public interface rotg
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 SROTG when |a| > |b|. When |b| >= |a|, the
sign of c and s will be different from those computed by SROTG
if the signs of a and b are not the same.
Subroutines
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
complex(kind=sp),
|
intent(inout) |
|
|
:: |
a |
|
complex(kind=sp),
|
intent(in) |
|
|
:: |
b |
|
real(kind=sp),
|
intent(out) |
|
|
:: |
c |
|
complex(kind=sp),
|
intent(out) |
|
|
:: |
s |
|
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
a |
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
b |
|
real(kind=dp),
|
intent(out) |
|
|
:: |
c |
|
real(kind=dp),
|
intent(out) |
|
|
:: |
s |
|
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
a |
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
b |
|
real(kind=sp),
|
intent(out) |
|
|
:: |
c |
|
real(kind=sp),
|
intent(out) |
|
|
:: |
s |
|
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
complex(kind=dp),
|
intent(inout) |
|
|
:: |
a |
|
complex(kind=dp),
|
intent(in) |
|
|
:: |
b |
|
real(kind=dp),
|
intent(out) |
|
|
:: |
c |
|
complex(kind=dp),
|
intent(out) |
|
|
:: |
s |
|
Module Procedures