

   RRaattiioonnaall AApppprrooxxiimmaattiioonn ttoo RReeaall NNuummbbeerrss

        rational(x, ...)

   AArrgguummeennttss::

          x: Numeric array to be approximated.

        ...: Optional additional parameters to be passed to
             rat(x, ...)

   VVaalluuee::

        Numeric array of the same shape as `x' of rational
        approximations.

        If `x' contains the results of a calculation for which
        the correct answers rational with ``small'' denomina-
        tors, this may remove roundoff error.

        Similar to `round(..)', except that full accuracy is
        maintained for many exactly rational quantities.

   SSeeee AAllssoo::

        `fractions' and the primitive function `rat'.

   EExxaammpplleess::

        # solve() accuracy check using a small Hilbert Matrix
            x <- matrix(0,5,5); x <- 1/(row(x) + col(x) - 1); rat(x)

            x1 <- solve(solve(x))
        #compare:
            x-x1
        #with:
            x-rational(x1)

