Skip to content

NumericQ

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

Attributes[NumericQ] := {Protected}

Simple examples

In[1]:= NumericQ[5]
Out[1]= True
In[2]:= NumericQ[a]
Out[2]= False
In[3]:= NumericQ[Sin[a]]
Out[3]= False
In[4]:= NumericQ[Sin[2]]
Out[4]= True