Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
arithmetic_geometric_mean: /* 31 August 2012 */
|
||||
procedure options (main);
|
||||
declare (a, g, t) float (18);
|
||||
|
||||
a = 1; g = 1/sqrt(2.0q0);
|
||||
put skip list ('The arithmetic-geometric mean of ' || a || ' and ' || g || ':');
|
||||
do until (abs(a-g) < 1e-15*a);
|
||||
t = (a + g)/2; g = sqrt(a*g);
|
||||
a = t;
|
||||
put skip data (a, g);
|
||||
end;
|
||||
put skip list ('The result is:', a);
|
||||
end arithmetic_geometric_mean;
|
||||
Loading…
Add table
Add a link
Reference in a new issue