Talk:Arithmetic-geometric mean
| WikiProject Mathematics (Rated Start-Class) | |||
|---|---|---|---|
| This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. | |||
| Mathematics rating: | Start Class | Mid Priority | Field: Analysis |
|
Please update this rating as the article progresses, or if the rating is inaccurate. |
|||
What is the arithmetic-geometric mean of 1 and 2? AxelBoldt
- To answer this, I added a Scheme implementation of the algorithm. (agmean 1 2 .000000001) => 1.4567910310469068 -- Damian Yerrick
Here is an alternative implementation in Scheme that is conceptually similar but is simpler (I checked this in Guile and it works):
(define (agm a b epsilon)
;; Determine if two numbers are already very close together
(define (ratio-diff a b) (abs (/ (- a b) b)))
;; Actually do the computation
(define (loop a b)
;; If they're already really close together, just return the arithmetic mean
(if (< (ratio-diff a b) epsilon)
(/ (+ a b) 2)
(loop (sqrt (* a b)) (/ (+ a b) 2)))) ; otherwise, do another step
;; Error checking
(if (or (not (real? a))
(not (real? b))
(<= a 0)
(<= b 0))
(error 'agm "~s and ~s must both be positive real numbers" a b)
(loop a b)))
[edit] What's it used for?
It's easy enough to find a use for an arithmetic mean, and a use for a geometric mean, but when do you use an arithmetic-geometric mean? — Daniel 20:52, 1 July 2007 (UTC)
- I am personally not familiar with any application of the agm as is (and I guess I would be if there was anything very important). It seems to me like more of a mathematical trivia (there is nothing bad with that, of course). However, it is equivalent to a certain elliptic integral, which itself is useful in evaluating some integrals. -- Meni Rosenfeld (talk) 09:11, 2 July 2007 (UTC)
-
- It is a remarkable computing method. The Springer OEM article is considerably more helpful than ours, and some of its most important sources, like Abramowitz & Stegun, are available online. --KSmrqT 10:49, 2 July 2007 (UTC)
- It converges quadratically and inspired the fastest known method for computing the digits of π. I've added the Borwein – Borwein book to the list of references. Arcfrk 06:16, 22 July 2007 (UTC)
[edit] Generalization
Doesn't the AGM property hold for any (finite?) set of numbers? Not just two, as represented in the article?Akshayaj 20:20, 2 July 2007 (UTC)
- What do you mean by "the AGM property"? If you mean the inequality of arithmetic and geometric means (which AFAIK is only loosely related to the topic of this article), then yes, the arithmetic mean of any set of positive numbers is at least their geometric mean (and equal iff all numbers are the same). -- Meni Rosenfeld (talk) 21:11, 2 July 2007 (UTC)
[edit] Source code listings?
I found source code implementations in three languages on this page. Having three variations does not give encyclopedic value, and I personally hardly find much value in having an implementation at all on the page (after all, the defining equation is in there already, and is for practical purposes identical to the source code). Therefore, I was bold and removed all three of them (instead of choosing one to keep).
The source codes in question are stored in the previous version: http://en.wikipedia.org/w/index.php?title=Arithmetic-geometric_mean&oldid=289728680
Remember, Wikipedia is not a source code repository, WP:NOT. --Berland (talk) 13:20, 14 May 2009 (UTC)