Graphics Programs Reference
In-Depth Information
φ
sign if
0, which isequivalenttousing
)
1
φ
| φ | +
2
t
=
sgn(
φ
+
To f o restal l exces sive roundoff errorif
φ
islarge, wemultiplyboth sides of the equation
2
by
| φ | +
φ
+
1 and solvefor t , which yields
sgn(
φ
)
t
=
φ
(9.16a)
| φ | +
2
+
1
φ
In the case of very large
, we shouldreplace Eq. (9.16a) by the approximation
1
2
t
=
(9.16b)
φ
2 . Ha ving comp uted t , wecan use the
to preventoverflowinthe computation of
φ
θ = 1
trigonometric relationship tan
θ =
sin
θ/
cos
cos 2
θ/
cos
θ
to obtain
1
c
=
1
s
=
tc
(9.17)
+
t 2
We now improve the computational properties of the transformation formulas in
Eqs. (9.13).Solving Eq. (a)for A , weobtain
c 2
s 2
A =
A kk +
A k
(c)
cs
Replacing all occurrences of A by Eq. (c) and simplifying, wecan write the transfor-
mation formulas in Eqs. (9.13) as
A kk =
A kk
tA k
A =
A +
tA k
A k =
A k =
0
(9.18)
A ki
A ik =
=
A ki
s ( A i + τ
A ki ),
i
=
k ,
i
=
A i
A i =
=
A i +
s ( A ki τ
A i ),
i
=
k ,
i
=
where
s
τ =
(9.19)
1
+
c
The introduction of
τ
allowedustoexpress each formulainthe form (original
value)
(change), which is helpful in reducing the roundoff error.
At the startofJacobi's diagonalizationprocess the transformationmatrix P is
initialized to the identitymatrix. Each Jacobi rotation changes this matrix from P
to P =
+
PR . The corresponding changes in the elements of P can be shown to be
Search WWH ::




Custom Search