阅读:1716回复:4
C语言写的定点乘DSP程序中可以出现DOUBLE类型吗?
定点DSP程序中对小数必须定标,变化为整形数,但MATH.H又支持DOUBLE类型的函数,这就是说,在程序中可以出现浮点数,那又何必定标呢?
|
|
沙发#
发布于:2003-10-10 14:15
定点dsp当然要进行定标,如果用到浮点数也必须转换成定点数才可以用啊。
|
|
板凳#
发布于:2003-10-10 14:52
我的意思是定点DSP程序中,可否出现FLOAT?
我见过一个定点DSP程序中出现了FLOAT,WHY? |
|
地板#
发布于:2003-10-11 10:14
把你见到的dsp代码列出来大家看看就知道了,估计是你看错了。常有些代码写成FLT***,然后用一个Mantissa和一个Exponent来表示浮点数以提高精度
|
|
地下室#
发布于:2003-10-16 12:54
TI C54x C compiler does support float. It uses system function calls in rts.lib to do the float math. If you compile a float math and check the asm code, you can see that it is done using function calls, you can even step into it to see how they do it.
The float math is not efficient though, i.e. slow. I would not worry to use float math in init, setup, config, but would think twice to use it in audio/video processing. |
|