?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 |
|
X coordinate of the Cartesian coordinate system. |
Input/Output |
b |
|
Y coordinate of the Cartesian coordinate system. |
Input/Output |
c |
|
Givens rotation parameter c. |
Output |
s |
|
Givens rotation parameter s. |
Output |
Dependency
#include "kblas.h"
Examples
C interface:
1 2 3 4 5 6 7 8 | 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
Parent topic: KML_BLAS Level 1 Functions