NumberQ
Examples
open allclose allBasic Examples (1)
NumberQ tests whether an object is explicitly a number:
Scope (3)
The expression must be manifestly a number:
You can test if a quantity represents a number with NumericQ:
On numerical coercion with N, such quantities generally become numbers:
NumberQ[Infinity] gives False:
The same is true for complex and directed infinities:
NumberQ[Overflow[]] and NumberQ[Underflow[]] give True:
They are both treated as Real:
Applications (2)
Test if a matrix consists entirely of numbers:
Define a function that only evaluates when the argument is a number:
It does not evaluate with a symbolic argument:
It does evaluate when the argument is a number:
Use FindRoot to find all the solutions of the boundary value problem with :
Text
Wolfram Research (1988), NumberQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberQ.html (updated 1996).
CMS
Wolfram Language. 1988. "NumberQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/NumberQ.html.
APA
Wolfram Language. (1988). NumberQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberQ.html