Numeric Quantities

Testing for numeric quantities.

(RefLink[Pi, paclet:ref/Pi]) is a symbol, so (RefLink[Pi, paclet:ref/Pi])+3 is not explicitly a number:

NumberQ[Pi+3]

It does however have a numerical value:

NumericQ[Pi+3]

This finds the explicit numerical value of (RefLink[Pi, paclet:ref/Pi])+3:

N[Pi+3]

The Wolfram Language knows that constants such as (RefLink[Pi, paclet:ref/Pi]) are numeric quantities. It also knows that standard mathematical functions such as (RefLink[Log, paclet:ref/Log]) and (RefLink[Sin, paclet:ref/Sin]) have numerical values when their arguments are numerical.

(RefLink[Log, paclet:ref/Log])[2+x] contains x, and is therefore not a numeric quantity:

{NumericQ[Log[2]],NumericQ[Log[2+x]]}

Many functions implicitly use the numerical values of numeric quantities:

Min[Exp[2],Log[2],Sqrt[2]]

In general, the Wolfram Language assumes that any function which has the attribute (RefLink[NumericFunction, paclet:ref/NumericFunction]) will yield numerical values when its arguments are numerical. All standard mathematical functions in the Wolfram Language already have this attribute. But when you define your own functions, you can explicitly set the attribute to tell the Wolfram Language to assume that these functions will have numerical values when their arguments are numerical.