Finished #40
WIP rewriting 39 with cont-frac