RealValuedNumberQ

RealValuedNumberQ[expr]

returns True if expr is a number with a real value and False otherwise.

Details

Examples

open allclose all

Basic Examples  (1)

Test whether an input is explicitly a real-valued number:

Scope  (8)

Integers are real-valued numbers:

Rational numbers are real valued:

Approximate reals are real-valued numbers:

Complex numbers are not real valued:

Approximate complex numbers are not considered real valued even if their imaginary part equals zero:

RealValuedNumberQ gives False for expressions that are real valued but not explicitly numbers:

RealValuedNumberQ[Infinity] gives False:

RealValuedNumberQ[Overflow[]] and RealValuedNumberQ[Underflow[]] give True:

They are both treated as Real:

Properties & Relations  (3)

RealValuedNumberQ is effectively equivalent to MatchQ[#,_Integer|_Rational|_Real]&:

RealValuedNumberQ[x] is equivalent to NumberQ[x]&&Head[x]=!=Complex:

If RealValuedNumberQ[x] is True, then RealValuedNumericQ[x] is also True:

Wolfram Research (2023), RealValuedNumberQ, Wolfram Language function, https://reference.wolfram.com/language/ref/RealValuedNumberQ.html.

Text

Wolfram Research (2023), RealValuedNumberQ, Wolfram Language function, https://reference.wolfram.com/language/ref/RealValuedNumberQ.html.

CMS

Wolfram Language. 2023. "RealValuedNumberQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RealValuedNumberQ.html.

APA

Wolfram Language. (2023). RealValuedNumberQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RealValuedNumberQ.html

BibTeX

@misc{reference.wolfram_2024_realvaluednumberq, author="Wolfram Research", title="{RealValuedNumberQ}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/RealValuedNumberQ.html}", note=[Accessed: 18-June-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_realvaluednumberq, organization={Wolfram Research}, title={RealValuedNumberQ}, year={2023}, url={https://reference.wolfram.com/language/ref/RealValuedNumberQ.html}, note=[Accessed: 18-June-2024 ]}