cancel
Showing results for 
Search instead for 
Did you mean: 

Logarithm and exponential function

j3lda
Associate II
Posted on March 09, 2015 at 10:02

Hello, I am using STM32F3 Discovery kit. I need to calculate logarithms and exponential function (e^x). I cant find these functions anywhere. Are they in any libraries from ST?

Thank you for answers
2 REPLIES 2
AvaTar
Lead
Posted on March 09, 2015 at 12:16

Are they in any libraries from ST?

 

No.

There is nothing ST - specific in, just core and FPU functionality.

Your toolchain should provide a math library libm.a, implementing most of the ANSI/POSIX math functionality. Just include math.h, and link against libm.a ('-lm').

Hint: you might want to avoid the (standard) double functions, and use the float versions (like logf() and expf()) instead.

Posted on March 09, 2015 at 21:17

Is there any intrinsic FPU support for trigonometry or transcendental functions?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..