Comment

Comment by dxbydt

aside: As the Professor points out, the ratio of pi to its evil twin is ~1.198, the arithmetic-geometric mean of sqrt(2) and 1. The geometric part involves a square root, and square roots are expensive. So I was like, well, if the AM converges to GM, then due to AM-GM-HM inequality, it must converge to the harmonic mean as well. And the HM does not need an expensive square root!

https://imgur.com/a/UkxkPzW

Its quite wild that the AM GM convergence is almost immediate - in just 2 steps, whereas to get a decent convergence for the Gauss's constant via HM, you need like 15 steps.You can dispense with expensive operators like square root but you end up paying for it with numerous iterations.

parent dxbydt 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton