Stern-Brocot sequence: Difference between revisions
m
no edit summary
m (fix a mistranslation of the Python version's indexing) |
mNo edit summary |
||
Line 3,040:
function sternbrocot(f::Function=(x) -> length(x) ≥ 20)::Vector{Int}
rst = Int[1, 1]
i =
while !f(rst)
append!(rst, Int[rst[i
i += 1
end
|