[N,D] = RAT(X,tol) returns two integer matrices so that N./D
is close to X in the sense that abs(N./D - X) <= tol*abs(X).
The rational approximations are generated by truncating continued
fraction expansions. tol = 1.e-6*norm(X(:),1) is the default.
RAT(X) or RAT(X,tol) displays the continued fraction representation.
The same algorithm, with the default tol, is used internally
by MATLAB for FORMAT RAT.
See also FORMAT478570, RATS .