Hurwitz continued fraction algorithm