Example:
A simple method is to take log of the given number on base 4, and if we get an integer then number is power of 4. i.e log4(n) = log10(n)/log10(4) as per below examples
from stack overflow:
Simple math:
log2 (x) = logy (x) / logy (2)
where y can be anything, which for standard log functions is either 10 or e.
When working with logarithms on your graphing calculator,
you must remember the "Change of Base Formula":
you must remember the "Change of Base Formula":
Remember, the notation:
log x is with respect to base 10 ln x is with respect to base e |
Logarithm basics
https://stackoverflow.com/questions/3064926/how-to-write-log-base2-in-c-c
https://mathbits.com/MathBits/TISection/Algebra2/logarithms.htm
|
No comments:
Post a Comment