Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
Private Function agm(a As Double, g As Double, Optional tolerance As Double = 0.000000000000001) As Double
|
||||
Do While Abs(a - g) > tolerance
|
||||
tmp = a
|
||||
a = (a + g) / 2
|
||||
g = Sqr(tmp * g)
|
||||
Debug.Print a
|
||||
Loop
|
||||
agm = a
|
||||
End Function
|
||||
Public Sub main()
|
||||
Debug.Print agm(1, 1 / Sqr(2))
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue