| << cosm | Trigonometric functions | cot >> |
| res = cospi(x) |
a numeric value
a numeric value
res = cospi(x) computes cos(x * pi) accurately.
For integers, cospi(x) is +1 or -1.
For odd integers, cospi(x / 2) is exactly zero.
x = [0, 1/2, 1, 3/2, 2];
r = cos(x * pi)
res = cospi(x)
| Version | Description |
|---|---|
| 1.0.0 | initial version |
Allan CORNET