我要评分
获取效率
正确性
完整性
易理解

?rotg

Construct a rotation plane.

Interface Definition

C interface:

void cblas_srotg(float *a, float *b, float *c, float *s);

void cblas_drotg(double *a, double *b, double *c, double *s);

Fortran interface:

CALL SROTG(SA, SB, SC, SS)

CALL DROTG(SA, SB, SC, SS)

Parameters

Parameter

Type

Description

Input/Output

a

  • Single-precision floating-point type for srotg
  • Double-precision floating-point type for drotg

X coordinate of the Cartesian coordinate system.

Input/Output

b

  • Single-precision floating-point type for srotg
  • Double-precision floating-point type for drotg

Y coordinate of the Cartesian coordinate system.

Input/Output

c

  • Single-precision floating-point type for srotg
  • Double-precision floating-point type for drotg

Givens rotation parameter c.

Output

s

  • Single-precision floating-point type for srotg
  • Double-precision floating-point type for drotg

Givens rotation parameter s.

Output

Dependency

#include "kblas.h"

Examples

C interface:

    float a = 6.0; 
    float b = -8.0; 
    float c, s; 
 
    cblas_srotg(&a, &b, &c, &s); 
    /* 
     * Output a:-10.000001, b:-1.666667, c:-0.600000, s:0.800000 
     */

Fortran interface:

      REAL(4) :: A=6.0 
      REAL(4) :: B=-8.0 
      REAL(4) :: C 
      REAL(4) :: S 
      EXTERNAL SROTG 
      CALL SROTG(A, B, C, S) 
 
*     Output A:-10.000001, B:-1.666667, C:-0.600000, S:0.800000