Mathematica 9 is now available

Rationalize

Usage

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


Notes

• Example: Rationalize[3.78]LongRightArrow .
Rationalize[x, dx] yields the rational number with the smallest denominator that lies within dx of x.
Rationalize[N[Pi]]LongRightArrow does not give a rational number, since there is none "sufficiently close" to N[Pi].
• A rational number  is considered "sufficiently close" to a Real  if  , where  is chosen to be  .
Rationalize[x, 0] converts any x to rational form.
• See Section 3.2.2.
• Related package: NumberTheory`Rationalize`.
• New in Version 1.


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.