### Basic Examples (3)

Express 0.5 as a rational number:

Express the machine precision approximation of *π* as a rational number:

Express a 50-digit approximation of *π* as a rational number:

### Scope (5)

Integers are returned unchanged:

Rationals are returned unchanged:

Exact representations of irrational numbers are returned unchanged:

RealRationalize also works with complex numbers by applying itself to the real and imaginary parts of that number:

RealRationalize has the Listable attribute, so it automatically works with lists:

### Properties and Relations (4)

Converting the rational representation back to a real number typically yields the original real number:

Unlike Rationalize, which has specific constraints on which numbers are rationalized and which ones are not, RealRationalize always attempts to return the nearest a rational number using RealDigits as its guide:

RealRationalize simply finds a close approximation, whereas Rationalize aims to find a human-friendly approximation:

RealRationalize may give slightly "better" results than Rationalize for certain special real number inputs:

### Possible Issues (2)

No attempt is made to rationalize exact representations of irrational numbers:

Convert these numbers to a machine or high-precision real first: