Skip to content

IsInteger ​

Tests whether x is manifestly an integer.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageIntegerQ✓
IsInteger(x)True if x is an integer, False otherwise
Typed signatures
TypePackageApplies
(any) -> booleancombinatoricsalways

Domain: Collections

Details
  • Returns False unless x is provably an integer -- there's no third "unknown" outcome, same convention as IsPrime.
  • A free symbol, or anything compute-engine can't classify, answers False.

Examples

Basic #
live ↗
InIsInteger(4)\mathrm{IsInteger}(4)OutTrue\mathrm{True}

Unknown xx cannot be shown integral, so the answer is False

live ↗
InIsInteger(x+4)\mathrm{IsInteger}(x+4)OutFalse\mathrm{False}
Scope #
live ↗
InIsInteger(12)\mathrm{IsInteger}(\frac{1}{2})OutFalse\mathrm{False}
live ↗
InIsInteger(x)\mathrm{IsInteger}(x)OutFalse\mathrm{False}
live ↗
InIsInteger(−3)\mathrm{IsInteger}(-3)OutTrue\mathrm{True}
About
Examples5
Checked againstWolfram Language 5 agree
CrosswalkWolfram Language

See also: IsPrime, IsTrue