On computing Givens rotations reliably and efficiently

被引:59
作者
Bindel, D [1 ]
Demmel, J
Kahan, W
Marques, O
机构
[1] Univ Calif Berkeley, Div Comp Sci, Berkeley, CA 94720 USA
[2] Univ Calif Berkeley, Lawrence Berkeley Lab, NERSC, Berkeley, CA 94720 USA
来源
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE | 2002年 / 28卷 / 02期
关键词
algorithms; performance; reliability; standardization; BLAS; Givens rotation; linear algebra;
D O I
10.1145/567806.567809
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We consider the efficient and accurate computation of Givens rotations. When f and g are positive real numbers, this simply amounts to computing the values of c=f/rootf(2)+g(2), s=g/rootf(2)+8(2), and r=rootf(2)+g(2). This apparently trivial computation merits closer consideration for the following three reasons. First, while the definitions of c, s and r seem obvious in the case of two nonnegative arguments f and g, there is enough freedom of choice when one or more of f and g are negative, zero or complex that LAPACK auxiliary routines SLARTG, CLARTG, SLARGV and CLARGV can compute rather different values of c, s and r for mathematically identical values of f and g. To eliminate this unnecessary ambiguity, the BLAS Technical Forum chose a single consistent definition of Givens rotations that we will justify here. Second, computing accurate values of c, s and r as efficiently as possible and reliably despite over/underflow is surprisingly complicated. For complex Givens rotations, the most efficient formulas require only one real square root and one real divide (as well as several much cheaper additions and multiplications), but a reliable implementation using only working precision has a number of cases. On a Sun Ultra-10, the new implementation is slightly faster than the previous LAPACK implementation in the most common case, and 2.7 to 4.6 times faster than the corresponding vendor, reference or ATLAS routines. It is also more reliable; all previous codes occasionally suffer from large inaccuracies due to over/underflow. For real Givens rotations, there are also improvements in speed and accuracy, though not as striking. Third, the design process that led to this reliable implementation is quite systematic, and could be applied to the design of similarly reliable subroutines.
引用
收藏
页码:206 / 238
页数:33
相关论文
共 19 条
[1]   Canonical and sociocultural approaches to research and reform in science education: The story of Juan and his group [J].
Anderson, CW ;
Holland, JD ;
Palincsar, AS .
ELEMENTARY SCHOOL JOURNAL, 1997, 97 (04) :359-383
[2]  
ANDERSON E, 2000, CS00454 U TENN COMP
[3]  
Anderson E., 1999, LAPACK USERS GUIDE
[4]  
*ANSI IEEE, 7541985 ANSI IEEE
[5]  
BINDEL D, 2002, SOFTWARE RELIABLE EF
[6]  
Demmel J.W., 1997, APPL NUMERICAL LINEA
[7]   FASTER NUMERICAL ALGORITHMS VIA EXCEPTION HANDLING [J].
DEMMEL, JW ;
LI, XY .
IEEE TRANSACTIONS ON COMPUTERS, 1994, 43 (08) :983-992
[8]  
DONGARRA JJ, 1979, LINPACK USERS GUIDE
[9]  
Golub G. H., 2013, Matrix Computations
[10]   Implementing the complex arcsine and arccosine functions using exception handling [J].
Hull, TE ;
Fairgrieve, TF ;
Ping, TPT .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 1997, 23 (03) :299-335