DLARTG(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

DLARTG(3) πŸ’…βœ¨

okay bestie, welcome to this Library Functions Manual page for DLARTG(3). It’s giving real cosine + real sine rotation, and the math is iconic. No cap, every detail is here.


🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlartg.f90

✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine DLARTG (f, g, c, s, r) β€” DLARTG generates a plane rotation with real cosine and real sine.

πŸ’– Function/Subroutine Documentation πŸ’–

subroutine DLARTG (real(wp) f, real(wp) g, real(wp) c, real(wp) s, real(wp) r)

DLARTG generates a plane rotation with real cosine and real sine.

Purpose:

okay so the whole point, bestie: DLARTG generates a plane rotation so that

    [  C  S  ]  .  [ F ]  =  [ R ]
    [ -S  C  ]     [ G ]     [ 0 ]

where C**2 + S**2 = 1.

The mathematical formulas used for C and S are

R = sign(F) * sqrt(F**2 + G**2)
C = F / R
S = G / R

Hence C >= 0. The algorithm used to compute these quantities incorporates scaling to avoid overflow or underflow in computing the square root of the sum of squares.

This version is discontinuous in R at F = 0 but it returns the same C and S as ZLARTG for complex inputs (F,0) and (G,0).

This is a more accurate version of the BLAS1 routine DROTG, with the following other differences:

  • F and G are unchanged on return.
  • If G=0, then C=1 and S=0.
  • If F=0 and (G .ne. 0), then C=0 and S=sign(1,G) without doing any floating point operations (saves work in DBDSQR when there are zeros on the diagonal).

Below, wp=>dp stands for double precision from LA_CONSTANTS module.

Parameters

  • F β€” F is REAL(wp) β€” the first component of vector to be rotated.
  • G β€” G is REAL(wp) β€” the second component of vector to be rotated.
  • C β€” C is REAL(wp) β€” the cosine of the rotation.
  • S β€” S is REAL(wp) β€” the sine of the rotation.
  • R β€” R is REAL(wp) β€” the nonzero component of the rotated vector.

Author

Edward Anderson, Lockheed Martin

Date

July 2016

Contributors:

Weslley Pereira, University of Colorado Denver, USA

Further Details:

Definition at line 110 of file dlartg.f90.

Author (Doxygen edition)

Generated automatically by Doxygen for LAPACK from the source code.


xoxo, this page is served by LAPACK Version 3.12.0, page source /home/abui.../dlartg.f90(3) πŸ’–

πŸ“¦ where this page comes from