Re: [math-fun] Presentation on floating point implementation Monday, July 28, 2008 9:16 PM From: "Mike Speciner" <ms@alum.mit.edu>
Those were nice. One of the slides reminded me that for solving quadratics (-b +- sqrt(b^2-4ac))/2a = 2c/(-b -+ sqrt(b^2-4ac)), so better precision for the two roots can be obtained by picking one root from each side so that both can have the sign of the sqrt same as -b. (And then it's easy to see the RHS root approaching -c/b as a->0.)
I don't remember where I first saw this trick, but I've certainly made use of it many times.
--ms
I think I first heard it from F J Corbato's 6.251 in '66 or '67. --rwg PS: Here are some sums I'm contributing to Steve Finch's Central Binomial Coeffs page http://algo.inria.fr/csolve/cbc.pdf, which needed rhss . inf ==== n 2 n + 1 \ (- 1) x > --------------------------- = / 2 ==== (2 n + 1) binomial(2 n, n) n = 0 2 2 2 x x x x 4 li (- sqrt(-- + 1) + - + 1) - li (x sqrt(-- + 1) - --). 2 4 2 2 4 2 Unfortunately, Mma can't integrate this/x dx without enormous coaching, resulting in a formula for inf ==== n 2 n + 1 \ (- 1) x > --------------------------- / 3 ==== (2 n + 1) binomial(2 n, n) n = 0 stretching many pages. [I've just got the non-alternating case down to a page.] The case x=2 is 3 2 log (sqrt(2) + 1) log(2) log (sqrt(2) + 1) - ----------------- - ------------------------ 3 2 2 1 3 log (2) log(sqrt(2) + 1) - 4 li (-------) log(sqrt(2) + 1) - -------------------------- 2 sqrt(2) 4 2 3 %pi log(sqrt(2) + 1) 1 + ----------------------- + 2 li (2 - sqrt(2)) + 2 li (1 - -------) 4 3 3 sqrt(2) 3 2 7 zeta(3) log (2) 7 %pi log(2) - --------- - ------- - ------------- ~ 1.88217914070106, 16 24 24 and I can't get it any simpler. (E.g., the ten terms satisfy no integer relation.) The x=1 case is similar, inf ==== n \ (- 1)
--------------------------- / 3 ==== (2 n + 1) binomial(2 n, n) n = 0
3 19 log (%phi) 2 %phi = ------------- - 2 log(2) log (%phi) - 4 li (----) log(%phi) 3 2 2 2 2 7 %pi log(%phi) 1 %phi - 4 log (2) log(%phi) + ---------------- - li (- - ----) 10 3 2 4 %phi 1 1 3 zeta(3) + 4 li (1 - ----) - 3 li (----) + 4 li (------) + --------- 3 2 3 %phi 3 2 %phi 10 ~ 0.98268607670276 There's no way to reduce the number of Li terms, but it's conceivable that transforming them into other Li terms could kill one or two of the Li-free terms. As you might also gather from math-fun, I simplified an enormous mess by non-rigorous means. FullSimplify's initial excretion included pages of terms like 2*I*Pi*ArcCsch[2]*(9*ArcCsch[2] - ArcSinh[3940598]) and (2/5)*Pi^2*(14*Log[2] + 17*Log[3 - Sqrt[5]] - Log[12360848946698171 + 5527939700884757*Sqrt[5]]). The latter comes from phi^77. inf ==== \ 1
--------------------------- / 3 ==== (2 n + 1) binomial(2 n, n) n = 0
= 4 Im(2 Li ((sqrt(3) - 2) %i + 1) + Li ((2 - sqrt(3)) %i)) 3 3 %pi li (4 sqrt(3) - 7) 2 - ---------------------- 6 3 %pi log(128 - 64 sqrt(3)) log(8 - 4 sqrt(3)) 7 %pi + -------------------------------------------- + ------ 6 72 ~ 1.0200208006525428 . This one's a pleasant surprise: inf ==== 2 n + 1 \ 2
--------------------------- / 3 ==== (2 n + 1) binomial(2 n, n) n = 0 2 3 1 - %i %i + 1 %pi log (2) %pi = 4 %i (li (------) - li (------)) - ----------- - ---- = 3 2 3 2 4 16
2 3 %pi log (2) 3 %pi = 4 %i (li (%i + 1) - li (1 - %i)) + ----------- + ------ 3 3 2 8 ~ 2.245380049461289, even shorter with IM or chi or Ti_3 notation.