Function

vvcosisin

Calculates the cosine and sine of each element in an array of double-precision values.

Declaration

void vvcosisin(__double_complex_t *, const double *, const int *);

Parameters

parameter 1

The output array, y.

parameter 2

The input array, x.

parameter 3

The number of elements in the arrays.

Discussion

This function calculates the complex number on the unit circle corresponding to the angle given by each element of a vector.

The following code shows an example of using vvcosisin.

#include <complex.h>

double x[] = {-M_PI_2, 0, M_PI_2};
complex double y[3];
int n = 3;
 
vvcosisin(y, x, &n);

On return, for each array element in y, real is the cosine of x and imag is the sine of x.

See Also

Array-Oriented Trigonometric Functions

vvsin

Calculates the sine of each element in an array of double-precision values.

vvsinf

Calculates the sine of each element in an array of single-precision values.

vvsinpi

Calculates the sine of pi multiplied by each element in an array of double-precision values.

vvsinpif

Calculates the sine of pi multiplied by each element in an array of single-precision values.

vvcos

Calculates the cosine of each element in an array of double-precision values.

vvcosf

Calculates the cosine of each element in an array of single-precision values.

vvcospi

Calculates the cosine of pi multiplied by each element in an array of double-precision values.

vvcospif

Calculates the cosine of pi multiplied by each element in an array of single-precision values.

vvcosisinf

Calculates the cosine and sine of each element in an array of single-precision values.

vvsincos

Calculates the cosine and sine of each element in an array of double-precision values.

vvsincosf

Calculates the cosine and sine of each element in an array of single-precision values.

vvtan

Calculates the tangent of each element in an array of double-precision values.

vvtanf

Calculates the tangent of each element in an array of single-precision values.

vvtanpi

Calculates the tangent of pi multiplied by each element in an array of double-precision values.

vvtanpif

Calculates the tangent of pi multiplied by each element in an array of single-precision values.

vvasin

Calculates the arcsine of each element in an array of double-precision values.

vvasinf

Calculates the arcsine of each element in an array of single-precision values.

vvacos

Calculates the arccosine of each element in an array of double-precision values.

vvacosf

Calculates the arccosine of each element in an array of single-precision values.

vvatan

Calculates the arctangent of each element in an array of double-precision values.

vvatanf

Calculates the arctangent of each element in an array of single-precision values.

vvatan2

Calculates the arctangent of each pair of elements in two arrays of double-precision values.

vvatan2f

Calculates the arctangent of each pair of elements in two arrays of single-precision values.