Golden ratio/Convergence: Difference between revisions

m
(Added Lua version)
Line 1,176:
phi = 1 + 1 / phi
iters = iters + 1
until phi == (1 + math.sqrt(5)) / 2
print("Value of phi: " .. phi)
print("Iterations required: " .. iters)</syntaxhighlight>
31

edits