Estimate logarithm quickly
|
08-21-2021, 03:39 PM
Post: #1
|
|||
|
|||
Estimate logarithm quickly
Estimate logorithm quickly, with tiny errors.
source: Dead Reckoning: Calculating without Instruments, p. 123 n*n = (n+x) * (n-x) * (n*n/(n*n-x*x)) 2*ln(n) = ln(n+x) + ln(n-x) + ln(n*n/(n*n-x*x)) ln(n*n/(n*n-x*x)) = ln(1-x*x/(n*n-x*x)) = 2*atanh(x*x/(2*n*n-x*x)) Let a = ln(n+x), b = ln(n-x), c = n/x, and halved both side. ln(n) = (a+b)/2 + atanh(1/(2*c*c-1)) atanh(1/(2*c*c-1)) > atanh(1/c) / (2c) = (a-b)/2 / (2c) → ln(n) > (a+b)/2 + (a-b)/2 / (2c) If we divide both side by ln(base), inequality still holds We can thus generalize for log of any base. Example, n=3, x=1 a = log(3+1) = 2*log(2) b = log(3-1) = log(2) c = 3/1 = 3 log(3) > 3*log(2)/2 + (log(2)/2) / (2*3) = 19/12 * log(2) log(3)/log(2) > 19/12 Example, n=3, x=1.5 a = log(3+1.5) = 2*log(3)-log(2) b = log(3-1.5) = log(3)-log(2) c = 3/1.5 = 2 log(3) > (3*log(3)-2*log(2))/2 + (log(3))/2 / (2*2) = -log(2) + 13/8*log(3) log(2) > 5/8*log(3) log(3)/log(2) < 8/5 19/12 < log2(3) < 8/5 Both extreme happened to be convergents of log2(3) C:\> spigot -C log(3)/log(2) | head 1/1 2/1 3/2 8/5 19/12 65/41 84/53 485/306 1054/665 24727/15601 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)