ExactNumberQ

ExactNumberQ[expr]

returns True if expr is an exact real or complex number, and returns False otherwise.

Details

Examples

open allclose all

Basic Examples  (1)

ExactNumberQ tests whether an object is explicitly an exact number:

Scope  (2)

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:

Properties & Relations  (4)

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:

Introduced in 1999
 (4.0)