NumericQ

NumericQ[expr]
gives True if expr is a numeric quantity, and False otherwise.

DetailsDetails

  • 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.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

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]=
New in 3
New to Mathematica? Find your learning path »
Have a question? Ask support »