Sturmian word: Difference between revisions
Content added Content deleted
Line 27: | Line 27: | ||
== {{header|Phix}} == |
== {{header|Phix}} == |
||
Rational part translated from Python, quadratic part modified |
Rational part translated from Python, quadratic part a modified copy of the [[Continued fraction convergents]] task. |
||
<!--(phixonline)--> |
<!--(phixonline)--> |
||
<syntaxhighlight lang="Phix"> |
<syntaxhighlight lang="Phix"> |
||
Line 67: | Line 67: | ||
sequence p = {0, 1}, |
sequence p = {0, 1}, |
||
q = {1, 0} |
q = {1, 0} |
||
atom |
atom rem = (sqrt(a)*b + m) / n |
||
rem = r |
|||
for i=1 to k do |
for i=1 to k do |
||
integer whole = trunc(rem), |
integer whole = trunc(rem), |