continued fraction unit fraction algorithm