Skip to content

IsNumeric ​

Whether expr denotes a definite numeric quantity, without evaluating it.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageNumericQ✓
IsNumeric(expr)TrueTrue for a number literal or an expression built from numeric literals and constants like π\pi, FalseFalse otherwise.
Typed signatures
TypePackageApplies
(any) -> booleancombinatoricsalways

Domain: Collections

Details
  • Wolfram spells this NumericQ; renamed to the Is… convention used across compute-engine predicates.
  • A plain symbol with no numeric value (like x) is not numeric, even though it could later be assigned one.

Examples

Basic #
live ↗
InIsNumeric(π)\mathrm{IsNumeric}(π)OutTrue\mathrm{True}
live ↗
InIsNumeric(5)\mathrm{IsNumeric}(5)OutTrue\mathrm{True}

sin⁡2\sin\sqrt2 is a constant, so it counts as numeric

live ↗
InIsNumeric(sin⁡(2))\mathrm{IsNumeric}(\sin(\sqrt{2}))OutTrue\mathrm{True}
Scope #

A plain symbol carries no definite numeric value

live ↗
InIsNumeric(x)\mathrm{IsNumeric}(x)OutFalse\mathrm{False}

Built from numeric literals and a known numeric function

live ↗
InIsNumeric(2)\mathrm{IsNumeric}(\sqrt{2})OutTrue\mathrm{True}

A free symbol is not numeric

live ↗
InIsNumeric(expr)\mathrm{IsNumeric}(\mathrm{expr})OutFalse\mathrm{False}
live ↗
InIsNumeric(k)\mathrm{IsNumeric}(k)OutFalse\mathrm{False}
About
Examples7
Checked againstWolfram Language 7 agree
CrosswalkWolfram Language

See also: IsMachineNumber, Precision