cospi
Computes cos(X * pi) accurately.
📝 Syntax
res = cospi(x)
📥 Input argument
x - a numeric value
📤 Output argument
res - a numeric value
📄 Description
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.
💡 Example
x = [0, 1/2, 1, 3/2, 2];
r = cos(x * pi)
res = cospi(x)🔗 See also
🕔 History
Version
📄 Description
1.0.0
initial version
Last updated
Was this helpful?