2 ms·
I think it's fun to know how to compute log2(x) or log10(x) using a 4 function calculator. Log 2 is a matter of dividing by two (and adding 1 to the log2 value
by mikewarot 3y ago
I think it's fun to know how to compute log2(x) or log10(x) using a 4 function calculator.
Log 2 is a matter of dividing by two (and adding 1 to the log2 value) until X is in the range [1,2)... (or multiplying by 2 and subtracting 1). The to handle the fraction, square the number, if it's above 2, divide by two and add a 1 to the binary fraction, if not, add a 0.... and continue.
Log 10 is similar... divide by 10, then once you're in the [1,10) range... take X to the 10th power (square, square, *X, then square)... count the number of times to get the number back to the [1,10) range, and add that digit after the decimal, and repeat.
- kqr 3y agoAlso if you know how to compute log 10 of a value you can multiply it by 3.3 to get the log 2 value! 2.3 to get log e.
- adammarples 3y agoYou can in general convert any log base a to log base b by multiplying it by a constant factor of log base b (a)