Skip to main content
j3lda
Associate II
March 9, 2015
Question

Logarithm and exponential function

  • March 9, 2015
  • 2 replies
  • 1953 views
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
    This topic has been closed for replies.

    2 replies

    AvaTar
    Senior III
    March 9, 2015
    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.

    Tesla DeLorean
    Guru
    March 9, 2015
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..