Sturmian word: Difference between revisions
m
→{{header|Phix}}
(→{{header|Wren}}: Modified to deal with Sturmian words derived from quadratric as well as rational numbers.) |
|||
Line 27:
== {{header|Phix}} ==
Rational part translated from Python, quadratic part modified from the [[Continued fraction convergents]] task.
<!--(phixonline)-->
<syntaxhighlight lang="Phix">
Line 61:
sturmian = sturmian_word(13, 21)
assert(fib[1..length(sturmian)] == sturmian)
function cfck(integer a, b, m, n, k)
Line 85:
{{out}}
<pre>
01001010010010100101001001010010 <== 1/phi (8th convergent)
</pre>
|