log in vexpr

    Jul 13 2018 | 6:42 pm
    Hi all,
    I'm try to do a log on a list but can figure out how to do it using vexpr log10
    so I resorted to jit.op @op log @val 64
    Could anyone shed light to how to do with vexpr instead thanks

    • Jul 13 2018 | 10:06 pm
      The simplest solution works for me:
      But if you want to calculate a logarithm to a arbitrary base (jit.op @op log is just a natural logarithm) you can use this formula: log(x)/log(base). (see https://en.wikipedia.org/wiki/Logarithm#Change_of_base)
    • Jul 14 2018 | 12:27 am
      Thanks a lot KLSDIZ
      All I need to know (or at least this is what I understand) is that log is a function and so it needs the () as in log()
      so vexpr log($f1)/log(64) + 1. or vexpr log($f1)/log($f2) + 1 would give me the dynamic base.
    • Jul 16 2018 | 9:53 pm
      what I actually wanted was a booster in both directions not even a log.
      here it is