Rational function algorithms