S32K144 AMMCLIB MLIB_Div_F32() Precision Problem

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

S32K144 AMMCLIB MLIB_Div_F32() Precision Problem

2,709 次查看
420113461
Contributor I

When using ammclib tool library for division calculation, the last 15 bit(bit14 --- bit0) results of each calculation are 0, and the actual accuracy is only 16 bit(bit30 --- bit15).

code.pngdebug.png

0 项奖励
回复
4 回复数

2,507 次查看
petrz_
NXP Employee
NXP Employee

Hi,

we added a new library function MLIB_DivSatAccurate_F32 in the AMMCLib release 1.1.26. This function calculates the division with full 32-bit accuracy of the result. The function is faster than 64-bit by 32-bit division (if you relied on compiler's optimization capabilities) but not as fast as MLIB_DivSat_F32.

0 项奖励
回复

2,704 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can see it corresponds to the description. There's a note:

lukaszadrapa_0-1599544210237.png

 

Regards,

Lukas

 

0 项奖励
回复

2,698 次查看
420113461
Contributor I

What's the difference between the three versions of ammclib library? Will it improve the calculation accuracy?AMMCLIB.png

0 项奖励
回复

2,690 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

There's no difference. It just means if you have want to get object code for evaluation or if you want to buy a license for production (either object code only or full source code).

Regards,

Lukas

 

0 项奖励
回复