Golden ratio/Convergence: Difference between revisions
Content added Content deleted
m (→{{header|Lua}}) |
(→{{header|Lua}}: Flagged as incorrect) |
||
Line 1,169: | Line 1,169: | ||
=={{header|Lua}}== |
=={{header|Lua}}== |
||
{{incorrect|Lua|The task specifically asks for iteration until successive values differ by 10^-5.}} |
|||
<p>When representated as a 64-bit floating point value, it takes 38 iterations before the iterated value is indistinguishable from the calculated one.</p> |
<p>When representated as a 64-bit floating point value, it takes 38 iterations before the iterated value is indistinguishable from the calculated one.</p> |
||
<p>The stipulation to stop when the error is less than 1e-5 is presumably to prevent calculations with arbitrary-precision values from continuing infinitely.</p> |
<p>The stipulation to stop when the error is less than 1e-5 is presumably to prevent calculations with arbitrary-precision values from continuing infinitely.</p> |