主要内容

本页采用了机器翻译。点击此处可查看英文原文。

C2000 Square Root IQN

IQ 数的平方根或平方根倒数

描述

该模块计算 IQ 数的平方根或平方根的倒数,并返回相同 Q 格式的 IQ 数。该模块使用查表法和牛顿-拉夫逊近似法。

该模块的负输入将返回零值。

注意

该模块的实现过程中,在代码生成期间不会调用相应的 Texas Instruments® 库函数。TI 函数使用全局 Q 设置,而该模块使用的 MathWorks® 代码根据模块输入动态调整 Q 格式。有关详细信息,请参阅Using the IQmath Library

参数

Function

是计算平方根还是平方根的倒数

  • Square root (_sqrt) - 计算平方根。

  • Inverse square root (_isqrt) - 计算平方根的倒数。

参考资料

For detailed information on the IQmath library, see the user's guide for the C28x IQmath Library - A Virtual Floating Point Engine, Literature Number SPRC087, available at the Texas Instruments Web site.The user's guide is included in the zip file download that also contains the IQmath library (registration required).