Skip to main content
David.Cheng
Associate III
Question

how to call log function stm8L152

STVD AND cosmic

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

    This topic has been closed for replies.

    2 replies

    jean-christophe Toussaint
    Associate III

    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

    thanks!