This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
 NumberTheory`Rationalize` It is frequently useful to approximate arbitrary real numbers with a nearby rational. The built-in function Rationalize gives a rational approximation to a single real number. In certain situations, such as the computation of gear ratios or the setting of musical scales, one wants to get a list of rational numbers that approximates a given list of real numbers. You could simply apply Rationalize to each element in the list, but it is very likely that the elements in the result would not be related to each other in a simple way. To get a simultaneous rational approximation that preserves the relationships among the given numbers, you should use ProjectiveRationalize or AffineRationalize. Getting a simultaneous rational approximation. The second argument in ProjectiveRationalize and AffineRationalize controls the number of digits that are to be considered significant in the numbers given in the first argument. If no second argument is given all digits are considered significant. Note that the convention used for specifying the tolerances in this package differs from the one used in the built-in Rationalize. This loads the package. In[1]:= <