This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 使用__c6xabi_divf 对两个浮点数进行除法

Guru**** 2587365 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1055743/division-of-two-floating-point-numbers-using-__c6xabi_divf

主题中讨论的其他器件:TCI6638K2K

您好!

使用__c6xabi_divf inisic,我尝试将 TCI6638K2K (c66x 编译器)上的两个浮点数相除。 下面是用于除法的代码:

float a、b、c;

A = 0.5f;

b = 0.2f;

C = (float)_c6xabi_divf (5.0f、2.0f);

printf ("\n 内在函数除法=%f\n",c);

我将获得一个输出- 内在除法= 2147483648.000000、

但预期输出应为2.5

_c6xabi_divf API 的正确输入和输出格式是什么?

此致、

Sravya Keerthana.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    无需从 C 代码调用__c6xabi_divf。  只需写...

    c = a / b;

    本手册记录了_c6xabi_divf 的接口、以便理解实现方式。

    谢谢、此致、

    乔治