How to realize exp() function or sigmoid() function

取消
显示结果 
搜索替代 
您的意思是: 
已解决

How to realize exp() function or sigmoid() function

跳至解决方案
812 次查看
maxxu
Contributor IV

Hi

   I want to implement the sigmoid function,but, It appears that the function does not exist in the library,

   I use the Automotive Math and Motor Control Library Set for NXP MC9S12ZVM devices.

   Does the exp()function exist in the library? or,How should I implement it with other tools

   This algorithm, I hope to have as fast calculation speed as possible。

                                                                                                thank you 

0 项奖励
1 解答
774 次查看
pachamatej
NXP Employee
NXP Employee

Hello,

if you don't care about CPU load, then I would follow standard programming patterns for math implementation. Otherwise, I'd recommend to calculate a lookup table offline (e.g. using MS Excel) and then use it in the MCU. Polynomial approximation is also an option. The two techniques mentioned can be realized with support of the AMMCLib (GFLIB_Lut1D and MLIB functions such as Mul, Add, etc.).

Best regards,

Matej

在原帖中查看解决方案

2 回复数
775 次查看
pachamatej
NXP Employee
NXP Employee

Hello,

if you don't care about CPU load, then I would follow standard programming patterns for math implementation. Otherwise, I'd recommend to calculate a lookup table offline (e.g. using MS Excel) and then use it in the MCU. Polynomial approximation is also an option. The two techniques mentioned can be realized with support of the AMMCLib (GFLIB_Lut1D and MLIB functions such as Mul, Add, etc.).

Best regards,

Matej

791 次查看
maxxu
Contributor IV

Can someone help me?

0 项奖励