Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Numerical Evaluation & Precision > Representation of Numbers > Real >
Mathematica > Core Language > Expressions > Expression Structure > Atomic Elements of Expressions > Representation of Numbers > Real >

Real

Real
is the head used for real (floating-point) numbers.
  • can be used to stand for a real number in a pattern.
  • You can enter a floating-point number of any length.
  • You can enter a number in scientific notation by using the form .
  • You can enter a floating-point number in base b using . The base must be less than 36. The letters - or - are used in sequence to stand for digits 10 through 35.
  • Real is also used to indicate an approximate real number in Read.
Enter a real number:
Real is the Head for real numbers:
Enter a real number:
In[1]:=
Click for copyable input
Out[1]=
Real is the Head for real numbers:
In[2]:=
Click for copyable input
Out[2]=
Real numbers entered with just a few digits are generally represented as machine reals:
Enter a real number with many significant digits:
Arbitrary-precision reals are used when too many digits are given for a machine number:
Its Accuracy is based on the number of digits to the right of the decimal point:
Enter a real number with a specified Precision:
Enter a real number with a specified Accuracy:
Enter a real number with an exponent:
Enter a real number with an exponent and specified precision:
Enter a real number in binary:
Enter a real number in binary with precision specified in terms of bits:
Enter a real number in hexadecimal:
Enter a real number in base 35:
Format a real number using base 2:
can be used to represent a real number in a pattern:
A rule that replaces real numbers with nearby rationals:
Determine if a matrix consists entirely of approximate reals:
A rule that rounds all reals to have two digits after the decimal point:
Divide a restaurant bill to the nearest penny:
Define a function that only works for reals:
Define a function that has a special case for reals:
For integers and rationals use the corresponding approximate real:
Reals are numbers:
Real is used for approximate reals:
Reals are atomic objects with no subexpressions:
Use different formats for displaying a real number:
Use Reals in assumptions and to indicate domain conditions:
Real is only the head for approximate real numbers:
You can use the following function to test for numbers on the real axis:
New in 1 | Last modified in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF