Golden ratio/Convergence: Difference between revisions

m
(Created Nim solution.)
Line 279:
 
print "result: ", phi1, " after ", i, " iterations"
print "the error is approximately ", phi1 - (.5 * (1 + sqrt(5)))</syntaxhighlight>
{{out| Output}}<pre>result: 1.618033 after 14 iterations
 
the error is approximately -0.000001</pre>
end</syntaxhighlight>
 
==={{header|FreeBASIC}}===
305

edits