PRODUCTS
Mathematica
Mathematica Home Edition
Mathematica for Students
Mathematica for the Classroom
grid
Mathematica
Wolfram Lightweight Grid Manager
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
SOLUTIONS
Industry
Chemical Engineering
Image Processing
Mechanical Engineering
Petroleum Engineering
Environmental Sciences
Bioinformatics
Data Analysis and Mining
Financial Risk Management
Statistics
Software Engineering
More...
Education
Higher Education
Precollege Education
Students
Technology
Interactive Deployment
High-Performance and Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Learning Center
Training
Custom Group Seminars
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Wolfram|Alpha
Demonstrations Project
Wolfram Blog
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Built-in
Mathematica
Symbol
Numerical Functions
Tutorials »
|
N
Chop
Round
ContinuedFraction
Convergents
RootApproximant
LatticeReduce
FindSequenceFunction
See Also »
|
Continued Fractions & Rational Approximations
Number Recognition
Number Theory
More About »
Rationalize
Rationalize
[
x
]
converts an approximate number
x
to a nearby rational with small denominator.
Rationalize
[
x
,
dx
]
yields the rational number with smallest denominator that lies within
dx
of
x
.
MORE INFORMATION
Rationalize
[
x
,
dx
]
works with exact numbers
x
.
Rationalize
[
x
]
yields
x
unchanged if there no rational number close enough to
x
to satisfy the condition
p
/
q
-
x
<
c
/
q
2
, with
c
chosen to be
10
-4
.
Rationalize
[
x
, 0]
converts any
x
to rational form.
»
EXAMPLES
CLOSE ALL
Basic Examples
(1)
Convert to a rational number:
In[1]:=
Out[1]=
Scope
(5)
Applications
(3)
Properties & Relations
(3)
SEE ALSO
N
Chop
Round
ContinuedFraction
Convergents
RootApproximant
LatticeReduce
FindSequenceFunction
TUTORIALS
Numerical Functions
MORE ABOUT
Continued Fractions & Rational Approximations
Number Recognition
Number Theory
RELATED LINKS
Demonstrations with Rationalize
(
Wolfram Demonstrations Project
)
New in 1 | Last modified in 4