How should I compute log to the base two in python. Eg. I have this equation where I am using log base 2
import math e = -(t/T)* math.log((t/T)[, 2])
Don't forget that log[base A] x = log[base B] x / log[base B] A.
So if you only have log (for natural log) and log10 (for base-10 log), you can use
log
log10
myLog2Answer = log10(myInput) / log10(2)