Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  Built-in Functions /  Numerical Computation /  Number Representation /

Rationalize

FilledSmallSquare Rationalize[x] takes Real numbers in x that are close to rationals, and converts them to exact Rational numbers.
FilledSmallSquare Rationalize[x, dx] performs the conversion whenever the error made is smaller in magnitude than dx.

FilledSmallSquare Example: Rationalize[3.78]LongRightArrow.
FilledSmallSquare Rationalize[x, dx] yields the rational number with the smallest denominator that lies within dx of x.
FilledSmallSquare Rationalize[N[Pi]]LongRightArrow does not give a rational number, since there is none "sufficiently close" to N[Pi].
FilledSmallSquare A rational number is considered "sufficiently close" to a Real if , where is chosen to be .
FilledSmallSquare Rationalize[x, 0] converts any x to rational form.
FilledSmallSquare See The Mathematica Book on the web: Section 3.1.3.
FilledSmallSquare See also: Chop, Round, ContinuedFraction.