Mathematica > Mathematics and Algorithms > Numerical Evaluation & Precision > Representation of Numbers > ExactNumberQ >
Mathematica > Core Language > Expressions > Expression Structure > Atomic Elements of Expressions > Representation of Numbers > ExactNumberQ >

ExactNumberQ

ExactNumberQ[expr]
returns True if expr is an exact real or complex number, and returns False otherwise.
ExactNumberQ tests whether an object is explicitly an exact number:
ExactNumberQ tests whether an object is explicitly an exact number:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Both real and imaginary parts of a complex number must be exact:
ExactNumberQ is false for symbolic objects that represent numbers:
You can test these with NumericQ:
Numbers are considered either exact or approximate (inexact):
Exact numbers have Precision :
Exact numbers have Head Integer, Rational, or Complex:
A function equivalent to ExactNumberQ:
New in 4
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF