Skip to main content
David.Cheng
Associate III
July 25, 2019
Question

how to call log function stm8L152

  • July 25, 2019
  • 1 reply
  • 1220 views

STVD AND cosmic

I WANT TO calculate Thermistor temperature, but did not find a log funnction

    This topic has been closed for replies.

    1 reply

    jean-christophe Toussaint
    Associate III
    August 11, 2019

    Hi David

    First in STVD you need to configure the linker to enable the standard library for floats as shown in my attachment.

       volatile float r=100.0;

       volatile float ln=log(r); // calculate Napierian logarithm

    volatile float l10 = log10(r); // calculate logarithm to the base 10

    include of course math.h

    Hopefully it will help you.

    Best regards

    JC Toussaint

    David.Cheng
    Associate III
    August 12, 2019

    thanks!