file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__cos.html
Descriptionคำนวณ the trigonometric cosine function โดยใช้การรวมของ table lookup และ linear interpolation. มี separate functions สำหรับ Q15, Q31, and floating-point data types. The input ไปยัง the floating-point version อยู่ใน radians และใน the range [0 2*pi) ในขณะที่ the fixed-point Q15 and Q31 มี a scaled input ด้วย the range [0 +0.9999] แม็ปไปยัง [0 2*pi). The fixed-point range ถูกเลือกดังนั้นค่าของ 2*pi พันรอบเป็น 0.
การจัดให้มีใช้ขึ้นอยู่กับ table lookup โดยใช้ 256 values พร้อมด้วย linear interpolation. ขั้นตอนนี้ถูกใช้ :
1. การคำนวณของ the nearest integer table index
2. คำนวณ the fractional portion (fract) of the table index.
3. The final result เท่ากับ (1.0f-fract)*a + fract*b;
โดยที่
b=Table[index+0];
c=Table[index+1];