[math-fun] nonrecursive doubling of continued fractions