Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
function agm(x,y)
|
||||
set a = x
|
||||
set g = y
|
||||
while abs(a - g) > 0.00000000001
|
||||
set an = (a + g)/2
|
||||
set gn = sqrt(a * g)
|
||||
set a = an
|
||||
set g = gn
|
||||
set i = i + 1
|
||||
end while
|
||||
set result = g
|
||||
end function
|
||||
|
||||
set x = 1
|
||||
set y = 1/sqrt(2)
|
||||
echo (x + y)/2
|
||||
echo sqrt(x+y)
|
||||
echo agm(x,y)
|
||||
Loading…
Add table
Add a link
Reference in a new issue