I just can’t figure out how I can evaluate log base 2.
With [expr log($f1)], the log seems natural. log2($f1) is refused.
Thanks for your help!
you give the base as second value, the values are separated by a
comma, and commas must be "escaped" by a backslash.
In the [expr] object it seems that log() and ln() bother calculate the natural logarithm. When I try putting two arguments into log() I get an error saying it only understands one argument.
What you want to do is use the base changing rule of logarithms which states loga(x) = (logb(x)/logb(a)) where the emphasised letters represent the base of the logarithm. So if you want to be in base two use something like:
Hey, in my version of expr that doesn’t work. That’s why I always do it like this: expr log10($f1)/log10(2).
let see first if my version of expr really can do what i suggested. :P
Thank you for that precious help!
loga(x) = logb(x)/logb(a)
This is fascinating…
thx to luke hall also from me.
Is it ever too late for thank you? I think not. Thanks for the math lesson Luke.
C74 RSS Feed | © Copyright Cycling '74