Natural logarithm function

  • Hello,

    For my current application I need to make use of the natural logarithm function, Ln(x).

    I've seen that Visual Applets does not offer this function in its arithmetic library.

    I'd like to ask if there is any support available, or the natural logarithm function has to be implemented.

    In case of own implementation, how to tackle this matter?

    Thanks in advance.


  • Dear CarmenZ,

    Thanks for the idea. The LUT could help me, but not entirely.

    My use case is, I need to do the following calculation:


    • A and B can take the values from 1 to 255.
    • A is a dynamic CONST
    • B is my image

    One solution I have in mind is to implement a LUT for a single A value, but if I change A, I need to change the LUT content and recompile again the whole project, quite cumbersome.

    Another solution to consider all combinations, is to have a LUT for each A value, but this means that I need 255 LUTs with input 8 bits and output 16 bits because I want to work with floating values in the output.

    Best pratice for working with floating constants

    Programming will be tedious, and resources high.

    Do you have any other suggestions that can help me for my use case of Ln(A/B) ?

    Thanks in advance.