This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Programming / Tests  /
IntegerQ

  • IntegerQ[ expr ] gives True if expr is an integer, and False otherwise.
  • IntegerQ[ expr ] returns False unless expr is manifestly an integer (i.e., has head Integer).
  • You can use IntegerQ[ x ] = True to override the normal operation of IntegerQ, and effectively define x to be an integer.
  • See the Mathematica book: Section 2.3.5Section 3.1.1.
  • See also: EvenQ, OddQ, NumberQ, TrueQ.