tinycodinglm / ai /ai-0018.jsonl
winapiadmin's picture
Upload folder using huggingface_hub
1f3a244 verified
|
Raw History Blame Contribute Delete
4.66 kB
opencode trace
System You're going to compact the text as short as possible.

You're going to compact the text as short as possible.

User

Yes. There is a genuine higher-convergence alternative to Chudnovsky.
The Berndt–Chan (m=3315) Ramanujan-type series gives about 75.3178 decimal digits per term, versus about 14.1816 digits/term for Chudnovsky, so it needs about 5.31× fewer terms for the same number of digits.
A later Campbell preprint extends this family to about 153.8732 digits/term, but that construction is substantially more complicated. (arXiv)
That does not automatically mean it is 5× faster in wall-clock time. Chudnovsky's binary splitting and highly optimized multiplication are extremely effective, which is why record computations still use it. The latest y-cruncher record listed through 2025 was computed with its Chudnovsky machinery. (Number World)
Also: Gauss–Legendre / Brent–Salamin is much faster in convergence per iteration than Chudnovsky, but there is an important catch: an iteration becomes substantially more expensive as the precision grows.
and it has quadratic convergence. (MathWorld)
For moderate precision, AGM is extremely attractive.
For huge precision, not necessarily.

Algorithm Convergence Main expensive operation
Chudnovsky ~14.18 decimal digits/term Large integer multiplication
Gauss–Legendre quadratic, roughly doubles digits/iteration High-precision square root
Borwein quartic quartic Several high-precision operations
Borwein quintic quintic More complicated high-precision operations
The amusing part is that Chudnovsky has terrible-looking convergence by iteration count but excellent computational structure. Binary splitting turns its series into large integer arithmetic that modern multiplication algorithms handle extremely well.
So:
$$
\boxed{\text{fewer iterations} \neq \text{faster computation}}
$$
which is one of those irritating cases where asymptotic convergence politely refuses to tell you the whole story.
For example, to obtain (10^6) digits, Gauss–Legendre only needs on the order of
$$
\log_2(10^6)\approx 20
$$
iterations, but those iterations involve million-digit square roots. Chudnovsky needs roughly
$$
\frac{10^6}{14.18}\approx 70,500
$$
series terms, but binary splitting makes those terms dramatically cheaper to aggregate.
For very large record computations, Chudnovsky-style binary splitting therefore remains highly competitive despite its lower convergence order.

One important terminology point

The Gauss–Legendre algorithm for (\pi) is not the same thing as Gauss–Legendre quadrature. Here "Gauss–Legendre" refers to the AGM-based π algorithm, also called the Brent–Salamin algorithm. (MathWorld)
And if the actual goal is "find something genuinely better than Chudnovsky for arbitrary huge precision", then the interesting direction is not Gauss–Legendre. It is the quartic/quintic/high-order Borwein algorithms, or the more recent higher-order modular identities. (MathWorld)

Assistant

Condensed summary

  • Berndt–Chan (m=3315): ~75.32 digits/term, about 5.31× Chudnovsky's ~14.18 digits/term.

  • Campbell's extension: ~153.87 digits/term, but much more complicated.

  • Higher convergence doesn't imply proportionally faster runtime. Chudnovsky's binary splitting + fast multiplication is exceptionally efficient at huge precision.

  • Gauss–Legendre / Brent–Salamin uses the AGM and has quadratic convergence, roughly doubling the number of correct digits per iteration.

  • Its problem is that each iteration requires increasingly expensive high-precision square roots.

  • Therefore:

    $$
    \boxed{\text{fewer iterations}\neq\text{faster computation}}
    $$

For (10^6) digits:

  • Gauss–Legendre: ~20 iterations.
  • Chudnovsky: ~70,500 terms.

But Chudnovsky's terms can be efficiently combined through binary splitting, making it highly competitive for massive computations.

If the goal is genuinely beating Chudnovsky at extreme precision, the relevant territory is Borwein quartic/quintic methods and newer high-order modular identities, not simply Gauss–Legendre.