主要内容

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

C2000 Square Root IQN

智商数的平方根或倒数平方根

描述

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

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

注意

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

参数

函数

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

  • 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).