code: function cutNumber() {
          if (isFloat()) {
            var numerator = parseFloat(cutFloat());
  
            if (str[0] === '/') {
              // rational real part
              str = str.slice(1);
  
              if (isFloat()) {
                var denominator = parseFloat(cutFloat());
                return self.$Rational(numerator, denominator);
              } else {
                // reverting '/'
                str = '/' + str;
                return numerator;
              }
            } else {
              // float real part, no denominator
              return numerator;
            }
          } else {
            return null;
          }
        }
docs: handles both floats and rationals