Skip to content

Commit

Permalink
Fix derivation typo and add convergence value
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Oct 2, 2024
1 parent d13cd29 commit 395a4dc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ellipse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,12 @@ fn agm_elliptic_perimeter(accuracy: f64, radii: Vec2) -> f64 {
// <https://web.archive.org/web/20241002140956/https://www.maths.lancs.ac.uk/jameson/ellagm.pdf>)
//
// Therefore
// ∑ 2^(i-1) c_i^2 from i = 0 ≤ ∑ 2^(i-1) * ((1/2)^i c_0)^2
// = ∑ 2^-(i+1) * c_0^2
// ∑ 2^(i-1) c_i^2 from i = 0 ≤ ∑ 2^(i-1) ((1/2)^i c_0)^2 from i = 0
// = ∑ 2^-(i+1) c_0^2 from i = 0
// = c_0^2
//
// or, for arbitrary starting point n:
// ∑ 2^(i-1) c_i^2 from i = n ≤ ∑ 2^(i-1) ((1/2)^(i-n) c_i)^2 from i = n
// or, for arbitrary starting point n > 0:
// ∑ 2^(i-1) c_i^2 from i = n ≤ ∑ 2^(i-1) ((1/2)^(i-n) c_n)^2 from i = n
// = ∑ 2^(2n - i - 1) c_n^2 from i = n
// = 2^n ∑ 2^(-(i+1)) c_n^2 from i = n
// = 2^n 2^(2-n) c_n^2
Expand Down

0 comments on commit 395a4dc

Please sign in to comment.