Skip to main content
Visitor II
July 25, 2019
Question

how to call log function stm8L152

  • July 25, 2019
  • 1 reply
  • 876 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

    Visitor II
    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

    Visitor II
    August 12, 2019

    thanks!