Using exponential function in MPC5607B controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using exponential function in MPC5607B controller

638 Views
kpitsupportshas
Contributor I

Hello,

As this controller supports only fixed point arithmetic, can you please let us know how to integrate exponential function in MPC5607B. We observed that exponential function uses floating point value and its return type is float or double.

 

Regards,

Srinivasan K.

Labels (1)
0 Kudos
3 Replies

397 Views
kpitsupportshas
Contributor I

Hello Martin,

Thanks for quick reply.

We are using Runtime.PPCEABI.VS.UC.a library and want to use exponential(e^x) function. Could you please let us know, if this library doesn't support exponential function which library supports this?

Regards,

Srinivasan K.

0 Kudos

397 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

include  math.h to your project. Now you can use function exp. Please look at the file in the attachment, where you find description of the function (page 111-112).

Regards,

Martin

0 Kudos

397 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

could you please write me, which library and which function you want to use?

The fact that MPC5607B does not have SPE unit does not mean, you are not able to use floating point data types. But instead of floating point instructions, software support is used and floating point instructions has to be replace by standard VLE instructions and calculation takes more time.

Regards,

Martin

0 Kudos