converts an approximate number x to a nearby rational with small denominator.
yields the rational number with smallest denominator that lies within dx of x.
Examplesopen allclose all
Properties & Relations (3)
If Rationalize returns a rational number , then :
When Rationalize[x] returns x unchanged, there is no rational number satisfying this:
Rationalize[x,0] gives a rational that is equivalent to x up to the precision of x:
SetPrecision[x,∞] gets a rational directly from the bitwise representation of x:
RootApproximant[x] gives an algebraic number equivalent to x up to the precision of x:
Rationalize[x,0] gives a rational number equivalent to x up to the precision of x:
Wolfram Research (1988), Rationalize, Wolfram Language function, https://reference.wolfram.com/language/ref/Rationalize.html (updated 1999).
Wolfram Language. 1988. "Rationalize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1999. https://reference.wolfram.com/language/ref/Rationalize.html.
Wolfram Language. (1988). Rationalize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Rationalize.html