PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Mathematics and Algorithms
>
Numerical Evaluation & Precision
>
Precision & Accuracy Control
>
$MachineEpsilon
>
BUILT-IN MATHEMATICA SYMBOL
Machine-Precision Numbers
Tutorials »
|
$MachinePrecision
$MinMachineNumber
$MaxMachineNumber
See Also »
|
Precision & Accuracy Control
Representation of Numbers
System Information
More About »
$MachineEpsilon
$MachineEpsilon
gives the difference between
and the next-nearest number representable as a machine-precision number.
MORE INFORMATION
$MachineEpsilon
is typically
, where
n
is the number of binary bits used in the internal representation of machine-precision floating-point numbers.
$MachineEpsilon
measures the granularity of machine-precision numbers.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
The result of adding 1 to
$MachineEpsilon
is distinct from 1:
Adding a fraction of
$MachineEpsilon
effectively results in rounding:
In[1]:=
Out[1]=
The result of adding 1 to
$MachineEpsilon
is distinct from 1:
In[2]:=
Out[2]=
In[3]:=
Out[3]=
Adding a fraction of
$MachineEpsilon
effectively results in rounding:
In[4]:=
Out[4]=
In[5]:=
Out[5]=
Scope
(2)
The result of subtracting
from 1 is distinct from 1:
Find machine epsilon algorithmically:
Applications
(2)
Get the nearest machine number greater than another machine number:
and
are distinct:
and
differ only in the least significant bit:
Horner's method for evaluating a polynomial with a running error bound:
A polynomial with large coefficients:
Evaluate at
x
=10
; the error is large, but within the bound:
Properties & Relations
(3)
$MachineEpsilon
is a power of 2:
$MachineEpsilon
is twice
10
-
MachinePrecision
:
This is effectively
where
is the number of bits of machine precision:
1 and 1+
$MachineEpsilon
differ only in the least significant bit:
Neat Examples
(1)
The resolution of machine numbers is twice as fine just below 1 versus just above 1:
SEE ALSO
$MachinePrecision
$MinMachineNumber
$MaxMachineNumber
TUTORIALS
Machine-Precision Numbers
MORE ABOUT
Precision & Accuracy Control
Representation of Numbers
System Information
New in 2