root / synthbench / euroben-dm / mod2ci / .svn / text-base / rotb.f.svn-base @ 0:839f52ef7657
History | View | Annotate | Download (830 Bytes)
1 |
Subroutine rotb( arg, c, s ) |
---|---|
2 |
! ---------------------------------------------------------------------- |
3 |
! --- Stores rotation factors arg according to sine/cosine terms of |
4 |
! Givens transformation (used in rgmres). |
5 |
! ---------------------------------------------------------------------- |
6 |
Use numerics |
7 |
Use floptime |
8 |
Implicit None |
9 |
|
10 |
Real(l_) :: arg, c, s |
11 |
! ---------------------------------------------------------------------- |
12 |
If ( c == 0.0_l_ ) Then |
13 |
arg = 1.0_l_ |
14 |
Else If ( Abs( s ) < Abs( c ) ) Then |
15 |
arg = 0.5_l_*s*Sign( 1.0_l_, c ) |
16 |
flops = flops + 6 |
17 |
Else |
18 |
arg = 2.0_l_*Sign( 1.0_l_, s )/c |
19 |
flops = flops + 6 |
20 |
End If |
21 |
! ---------------------------------------------------------------------- |
22 |
End Subroutine rotb |