MCPcopy Create free account
hub / github.com/numpy/numpy / dlartg_

Function dlartg_

numpy/linalg/lapack_lite/f2c_d_lapack.c:23485–23646  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

23483} /* dlarfx_ */
23484
23485/* Subroutine */ int dlartg_(doublereal *f, doublereal *g, doublereal *cs,
23486 doublereal *sn, doublereal *r__)
23487{
23488 /* System generated locals */
23489 integer i__1;
23490 doublereal d__1, d__2;
23491
23492 /* Local variables */
23493 static integer i__;
23494 static doublereal f1, g1, eps, scale;
23495 static integer count;
23496 static doublereal safmn2, safmx2;
23497
23498 static doublereal safmin;
23499
23500
23501/*
23502 -- LAPACK auxiliary routine (version 3.2) --
23503 -- LAPACK is a software package provided by Univ. of Tennessee, --
23504 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
23505 November 2006
23506
23507
23508 Purpose
23509 =======
23510
23511 DLARTG generate a plane rotation so that
23512
23513 [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
23514 [ -SN CS ] [ G ] [ 0 ]
23515
23516 This is a slower, more accurate version of the BLAS1 routine DROTG,
23517 with the following other differences:
23518 F and G are unchanged on return.
23519 If G=0, then CS=1 and SN=0.
23520 If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
23521 floating point operations (saves work in DBDSQR when
23522 there are zeros on the diagonal).
23523
23524 If F exceeds G in magnitude, CS will be positive.
23525
23526 Arguments
23527 =========
23528
23529 F (input) DOUBLE PRECISION
23530 The first component of vector to be rotated.
23531
23532 G (input) DOUBLE PRECISION
23533 The second component of vector to be rotated.
23534
23535 CS (output) DOUBLE PRECISION
23536 The cosine of the rotation.
23537
23538 SN (output) DOUBLE PRECISION
23539 The sine of the rotation.
23540
23541 R (output) DOUBLE PRECISION
23542 The nonzero component of the rotated vector.

Callers 9

dbdsdc_Function · 0.85
dbdsqr_Function · 0.85
dgeev_Function · 0.85
dlaexc_Function · 0.85
dlalsd_Function · 0.85
dlasdq_Function · 0.85
dsteqr_Function · 0.85
zlalsd_Function · 0.85
zsteqr_Function · 0.85

Calls 5

pow_diFunction · 0.85
absFunction · 0.85
logFunction · 0.50
maxFunction · 0.50
sqrtFunction · 0.50

Tested by

no test coverage detected