(28/48/50) Complete Elliptic Integrals
|
03-04-2024, 06:11 PM
(This post was last modified: 03-05-2024 03:53 PM by John Keith.)
Post: #11
|
|||
|
|||
RE: (28/48/50) Complete Elliptic Integrals
(02-29-2024 04:31 AM)Albert Chan Wrote: Modify the AGM, we can get both K and E at the same time. I tried your agm2 code and it gives the correct value for K(k), but does not seem to give the correct value for E(k) using your formula above. Here is my RPL translation of your agm2: Code:
For m = .25, I get agm2(1, sqrt(.75)) ~ 0.866025403784 which returns b = 0.93180839162 s = 0.991019606076 For K(m) I get 1.68575035482 which is correct in all 12 digits and agrees with my program for K(.5) given that m = k^2. However, using your formula E = K + K*(y-m)/2 I get 2.31033738676, whereas the correct value is 1.46746220934. It is entirely possible that I made a transcription error and the above program is returning the wrong value for s, but I can't see where the problem is. Edit: Problem solved, see post below. Program edited to fix logical error. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)