https://5dok.net/document/y8gxee65-on-continued-fraction-algorithms-smeets-i.html