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

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

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

ソリューションへジャンプ
1,472件の閲覧回数
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 解決策
1,434件の閲覧回数
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 返答(返信)
1,435件の閲覧回数
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

1,451件の閲覧回数
maxxu
Contributor IV

Can someone help me?

0 件の賞賛