IntegerQ

IntegerQ[expr]

gives True if expr is an integer, and False otherwise.

Details

  • IntegerQ[expr] returns False unless expr is manifestly an integer (i.e. has head Integer).
  • Simplify[exprIntegers] can be used to try to determine whether an expression is mathematically equal to an integer.

Examples

open all close all

Basic Examples  (1)

IntegerQ tests whether an expression is explicitly an integer:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Applications  (2)

Properties & Relations  (2)

Possible Issues  (1)

Introduced in 1988
(1.0)
|
Updated in 1999
(4.0)