CodeWarrior Version 5.1 and Floating Point Library

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CodeWarrior Version 5.1 and Floating Point Library

512件の閲覧回数
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 返信

394件の閲覧回数
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 件の賞賛