Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -0,0 +1,17 @@
|
|||
begin
|
||||
var phi := 1.0;
|
||||
var phiprev := 0.0;
|
||||
var n := 0;
|
||||
var err := 0.0;
|
||||
while True do
|
||||
begin
|
||||
n += 1;
|
||||
phi := 1 + 1/phi;
|
||||
err := Abs(phi - phiprev);
|
||||
if err <= 1e-5 then
|
||||
break;
|
||||
phiprev := phi;
|
||||
end;
|
||||
Println($'Result = {phi} after {n} iterations');
|
||||
Println($'The error is approximately = {phi - (1+sqrt(5)) / 2}');
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue