InexactNumberQ[expr]
returns True if expr is an inexact real or complex number, and returns False otherwise.
InexactNumberQ
InexactNumberQ[expr]
returns True if expr is an inexact real or complex number, and returns False otherwise.
Details
- InexactNumberQ[expr] gives True if expr has head Real, or is a complex number either of whose components have head Real.
Examples
open all close allBasic Examples (1)
InexactNumberQ tests whether an object is explicitly an inexact number:
InexactNumberQ[5.6]InexactNumberQ[5 / 6]InexactNumberQ[x]Scope (2)
An approximate zero is inexact:
z = N[Pi, 20] - (1299139324288/413528890451)InexactNumberQ[z]Either real or imaginary parts of a complex number can be inexact:
InexactNumberQ[1. + 2 I]InexactNumberQ[2 + N[Pi, 20] I]If both real and imaginary parts are exact, then the number is not inexact:
InexactNumberQ[3 + 4 / 5 I]Properties & Relations (4)
Numbers are considered either exact or approximate (inexact):
numbers = {0, 1., 2`10, 3 / 4, 5 + 6 I, N[Pi, 7] + 8 I};TableForm[Table[{x, InexactNumberQ[x], ExactNumberQ[x]}, {x, numbers}], TableHeadings -> {{}, {"x", "inexact", "exact"}}]Inexact numbers have Precision less than
:
numbers = {0, 1., 2`10, 3 / 4, 5 + 6 I, N[Pi, 7] + 8 I};TableForm[Table[{x, InexactNumberQ[x], Precision[x]}, {x, numbers}], TableHeadings -> {{}, {"x", "inexact", "Precision"}}]Inexact numbers have head Real or Complex:
numbers = {0, 1., 2`10, 3 / 4, 5 + 6 I, N[Pi, 7] + 8 I};TableForm[Table[{x, InexactNumberQ[x], Head[x]}, {x, numbers}], TableHeadings -> {{}, {"x", "inexact", "Head"}}]A function equivalent to InexactNumberQ:
inq = (NumberQ[#] && (MatchQ[#, _Real | Complex[_Real, _] | Complex[_, _Real]]))&;numbers = {0, 1., 2`10, 3 / 4, 5 + 6 I, N[Pi, 7] + 8 I};TableForm[Table[{x, InexactNumberQ[x] === inq[x]}, {x, numbers}]]See Also
Related Guides
History
Introduced in 1999 (4.0)
Text
Wolfram Research (1999), InexactNumberQ, Wolfram Language function, https://reference.wolfram.com/language/ref/InexactNumberQ.html.
CMS
Wolfram Language. 1999. "InexactNumberQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/InexactNumberQ.html.
APA
Wolfram Language. (1999). InexactNumberQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InexactNumberQ.html
BibTeX
@misc{reference.wolfram_2026_inexactnumberq, author="Wolfram Research", title="{InexactNumberQ}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/InexactNumberQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_inexactnumberq, organization={Wolfram Research}, title={InexactNumberQ}, year={1999}, url={https://reference.wolfram.com/language/ref/InexactNumberQ.html}, note=[Accessed: 13-June-2026]}