cospif3
Half–cycle cosine functions
Part of cospi(3).
Usage
#include <math.h>
double
cospi(double x);
float
cospif(float x);
long double
cospil(long double x);
Library
Math Library (libm, -lm)
Overview
The cospi(), cospif(), and cospil() functions compute the cosine of π × x. and measure angles in half-cycles.
Return values
The cospi(), cospif(), and cospil() functions returns cos(π × x). If x 2^(p - 1) where p is the floating–point precision of x, then the returned value is 1 and it has no significance.
Special values
cospi(0)-
returns 1.
cospi(n/2)-
returns 0 for positive integers n.
cospi(n)-
returns 1 for even integers n.
cospi(n)-
returns -1 for odd integers n.
cospi(∞)-
return an and raises an FE_INVALID exception.
cospi()-
return an and raises an FE_INVALID exception.
Releases
14 releases since FreeBSD 13.1-RELEASE; the text changed 5 times.