Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

cblas_?rotg

Computes the parameters for a Givens rotation.

Syntax

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

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

void cblas_crotg (void *a, const void *b, float *c, void *s);

void cblas_zrotg (void *a, const void *b, double *c, void *s);

Include Files

  • mkl.h

Description

Given the Cartesian coordinates (a, b) of a point, these routines return the parameters c, s, r, and z associated with the Givens rotation. The parameters c and s define a unitary matrix such that:


Equation

The parameter z is defined such that if |a| > |b|, z is s; otherwise if c is not 0 z is 1/c; otherwise z is 1.

Input Parameters

a

Provides the x-coordinate of the point p.

b

Provides the y-coordinate of the point p.

Output Parameters

a

Contains the parameter r associated with the Givens rotation.

b

Contains the parameter z associated with the Givens rotation.

c

Contains the parameter c associated with the Givens rotation.

s

Contains the parameter s associated with the Givens rotation.