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!

NP

]]>you give the base as second value, the values are separated by a

comma, and commas must be “escaped” by a backslash.

What you want to do is use the base changing rule of logarithms which states log*a*(x) = (log*b*(x)/log*b*(a)) where the *emphasised* letters represent the base of the logarithm. So if you want to be in base two use something like:

[expr log10($f1)/log10(2)]

lh

]]>or

expr log10($f1)/log10(2)

or

expr ln($f1)/ln(2)

]]>loga(x) = logb(x)/logb(a)

This is fascinating…

NP

]]>