[math-fun] polygon inscribing constant
is Weisstein's name for the x = pi case of inf /===\ | | x | | cos(-), | | n n = 3 the inner/outer radius ratio of the annular nesting of all the regular polygons, alternated with circles. (With the right z(r), might make a nice drinking cup.) Perhaps equivalent to his Mathworld circumscribing formula, simply expand the log of the quadrisected product, inf inf inf /===\ /===\ /===\ | | x | | x | | x log(( | | cos(-------)) ( | | cos(-------)) ( | | cos(-------)) | | 4 n + 3 | | 4 n + 4 | | 4 n + 5 n = 0 n = 0 n = 0 inf /===\ | | x | | cos(-------)) | | 4 n + 6 n = 0 4 i 2 i 2 B pi inf 2 i 2 i i 2 i 2 i ==== (1 - 2 ) B (--------------- + (- 1) (2 + 1)) x \ 2 i 2 (2 i)! = > ---------------------------------------------------------- , / 2 i (2 i)! ==== i = 1 a series with convergence radius 3 pi/2, hence 2 lg 3 - 2 ~ 1.17 bits/term. Note the unusual Bern^2. Because B_n ~ n!/(2 pi)^n, the radius appears to be only pi/2 (useless), but the factor 4 i 2 i 2 B pi i 2 i 2 i i 2 i (- 1) 2 --------------- + (- 1) (2 + 1) ~ - ----------- 2 (2 i)! 2 i 3 saves the day, at the cost of 3.17 bits/term of subtractive cancellation. Adding more terms without raising the intermediate precision will actually ruin your accuracy. To 30 places, 1/8.70003662520819450322240985911. --rwg
I said,
Perhaps equivalent to [Bouwkamp's accelerated] circumscribing formula, simply expand the log of the quadrisected product,
The formulas turn out identical. In a desperate bid for originality, I trisected the rhs of the rearrangement inf inf 1 /===\ /===\ n + - | | x 2 x | | 2 x | | cos(-) = - sin(-) | | ----- sin(-----) | | n x 2 | | x 1 n = 3 n = 1 n + - 2 and got the same damn thing! But an obvious acceleration is to temporarily shed the first few terms of the product and start the series with a k-gon instead of a triangle: inf /===\ | | x log( | | cos(-)) = | | i i = k inf ==== i 4 i 2 i 2 i \ (- 1) (2 - 2 ) bern(2 i) hurwitz_zeta(2 i, k) x > -------------------------------------------------------- / 2 i (2 i)! ==== i = 0 E.g., starting with a pentagon, i 2 i 2 i - 1 (- 1) %pi 2 bern(2 i) 1 hurwitz_zeta(2 i, 5) = - -------------------------------- - ---- (2 i)! 2 i 4 1 1 - ---- - ---- - 1 2 i 2 i 3 2 - 2 i ~ 5 , giving a term ratio of 4/25 for x = pi. Finally, exponentiate, and restore the missing triangle and square factors (1/sqrt(8)). This (Hurwitz) zeta factor is the source of the severe subtractive cancellation mentioned last time, and grows worse for larger k *AND LARGER i*. I.e., for n digits of final accuracy, you need for the ith series term a precision of n + log_10(4/25) i ~ n - .796 i digits, so the zeta term requires n+log_10(4) i ~ n + .602 i digits of intermediate precision. If you are too lazy to adjust the precision of individual factors of individual terms, you need the worst case value of n/(1-log(2)/log(5)) ~ 1.76 n digits overall. --rwg Confidential to the Moderator: The elementwise product of two singular 2x2 matrices is singular, but the elementwise product of the three singular 3x3s (c27) map(transpose, [[1,1,1;1,1,1;0,0,1],[x,1,1;1,1,1;0,1,1],[y,1,1;0,1,1;0,1,1]]) [ 1 1 0 ] [ x 1 0 ] [ y 0 0 ] [ ] [ ] [ ] (d27) [[ 1 1 0 ], [ 1 1 1 ], [ 1 1 1 ]] [ ] [ ] [ ] [ 1 1 1 ] [ 1 1 1 ] [ 1 1 1 ] has determinant xy (c28) map(det,endcons(apply("*",%),%)); (d28) [0, 0, 0, x y] so the product of any number can be nonsingular.
I said
inf /===\ | | x log( | | cos(-)) = | | i i = k
inf ==== i 4 i 2 i 2 i \ (- 1) (2 - 2 ) bern(2 i) hurwitz_zeta(2 i, k) x > -------------------------------------------------------- / 2 i (2 i)! ==== i = 0
This sum should be from i = 1, not i = 0, which produces a 0/0. This was a tricky bug--the result of termwise integrating a series starting with a nontrivial 0, resulting in the wrong constant of integration. --rwg DISORIENTATING DISINTEGRATION
participants (1)
-
R. William Gosper