This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NumericQ

NumericQ[expr]
gives True if expr is a numeric quantity, and False otherwise.
  • An expression is considered a numeric quantity if it is either an explicit number or a mathematical constant such as Pi, or is a function that has attribute NumericFunction and all of whose arguments are numeric quantities.
  • In most cases, NumericQ[expr] gives True whenever N[expr] would yield an explicit number.
NumericQ tests whether an object is a numeric quantity:
In most cases, NumericQ[expr] gives True whenever N[expr] yields an explicit number:
NumericQ tests whether an object is a numeric quantity:
In[1]:=
Click for copyable input
Out[1]=
In most cases, NumericQ[expr] gives True whenever N[expr] yields an explicit number:
In[2]:=
Click for copyable input
Out[2]=
An object is numeric if all its constituents are numeric:
Some parts of the expression are numeric:
When f has the NumericFunction attribute then is numeric when args are numeric:
The system symbols that represent numerical constants:
The system symbols with the NumericFunction attribute:
Any combination of these functions with numeric arguments will be numeric:
In most cases, N[e] will not be a number since it is improbable that the arguments are correct:
Test if a matrix consists of numeric entries:
Define a function that only evaluates when its argument is numeric:
Define a function that has a special case for numeric arguments:
NumericQ[e] does not always imply that N[e] will yield a number:
This can also happen when the arguments for the function are given incorrectly:
New in 3