Rational functions calculator