LinearAlgebra`BLAS`
LinearAlgebra`BLAS`

ROTG

ROTG[a,b,c,s]

computes a Givens rotation {c,s} for given scalars a and b.

更多信息和选项

  • To use ROTG, you first need to load the BLAS Package using Needs["LinearAlgebra`BLAS`"].
  • The following arguments must be given:
  • ainput/output symbolscalar; the symbol value is modified in place
    binput/output symbolscalar; the symbol value is modified in place
    coutput symbolscalar; the symbol value is modified in place
    soutput symbolscalar; the symbol value is modified in place
  • ROTG[a,b,c,s] computes {c,s} such that {{c,s},{-Conjugate[s],c}.{a,b}=={r,0}, where the signed radius r is given by rSign[b]Norm[{a,b}] if a==0 or a,b with Abs[a]Abs[b], and by rSign[a]Norm[{a,b}] otherwise. In the degenerate case a==b==0, by convention c==1 and s==0.
  • The scalars c and s can be viewed as the cosine and sine, respectively, of the angle of rotation and satisfy the conditions c and c2+Abs[s]21.
  • The scalar a is set to r. The scalar b is not modified if either a or b is complex. Otherwise, b is set to the value z given by:
  • sif Abs[a]>Abs[b]
    1/cif 0<Abs[a]Abs[b]
    1if 0==Abs[a]<Abs[b]
    0if 0==Abs[a]==Abs[b]
  • When given, the value z can be used to reconstruct c and s as follows:
  • c1/z sif Abs[z]>1
    c0s1if z1
    cszif 0<Abs[z]<1
    c1s0if z==0

范例

打开所有单元关闭所有单元

基本范例  (1)

Load the BLAS package:

Compute a Givens rotation for given scalars:

Scope  (3)

Real values:

Complex values:

Note that c is real-valued even when the inputs are complex:

Arbitrary-precision values:

Properties & Relations  (1)

ROTG[a,b,c,s] satisfies the relation {{c,s},{-Conjugate[s],c}}.{a,b}={r,0} where r is the number saved in a:

The scalars c and s form a unit vector with c real:

Possible Issues  (2)

All arguments must be symbols:

The first and the second arguments are modified and must be initialized to scalars:

Wolfram Research (2017),ROTG,Wolfram 语言函数,https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html.

文本

Wolfram Research (2017),ROTG,Wolfram 语言函数,https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html.

CMS

Wolfram 语言. 2017. "ROTG." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html.

APA

Wolfram 语言. (2017). ROTG. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html 年

BibTeX

@misc{reference.wolfram_2024_rotg, author="Wolfram Research", title="{ROTG}", year="2017", howpublished="\url{https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rotg, organization={Wolfram Research}, title={ROTG}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html}, note=[Accessed: 22-November-2024 ]}