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 allclose 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)

See Also

EvenQ  OddQ  NumberQ  TrueQ  Element  Integer  Integers

Tutorials

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