iqsinpu()函数的例子中,int1的注释里,为什么是除以2π,而不是π?是例子写错了吗?
Seven Han:您的这个文档是在哪里看到的?
请参考controlsuite中的IQmath user’s Guide:\ti\controlSUITE\libs\math\IQmath\v160\doc
#include “IQmathLib.h”
#define PI 3.14156
_iq in1, out1;
_iq30 in2, out2;
void main(void ){
// in1 = in2 = (0.25 x PI)/(2PI) x 2^30
// = (.25/2) x 2^30 = 0x08000000 or .125
// out1 = out2 = sinPU(0.25/2) x 2^30 = 0x2D413CCC or .707
in1 =_IQ(0.25L/2.0L);
out1 =_IQsinPU(in1)
in2 =_IQ30(0.25*PI/PI);
out2 =_IQ30sinPU(in2);
}