CodeWarrior Version 5.1 and Floating Point Library

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CodeWarrior Version 5.1 and Floating Point Library

928 次查看
HeMyFAE
NXP Employee
NXP Employee

On of our customer is using CodeWarrior Development Studio for the S12(X) Version 5.1, build 10221. He is testing how the floating point library handles overflow.  If  he multiply 1.8e19 times 1.8e19 it gives him +INF (0x7f800000) which is what he would expect.  If he multiply 3.4e19 time 1.8e19, I get NAN, which he did not expect.  He was expecting +INF.  If he multiply 3.4e19 time 3.4e19  he gets -0 (0x80000000). This one is a problem.  In a control system you never want to get 0 when multiplying two large numbers together.  Do you have any idea how he can trap this overflow so he don’t get 0 for his result?

 

Regards,

hy

标签 (1)
0 项奖励
回复
1 回复

810 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi hy

Can you please provide a demo project for this problem?

Thanks!


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复