# RealValuedNumericQ

RealValuedNumericQ[expr]

gives True if expr is a real-valued numeric quantity, and False otherwise.

# Details # Examples

open allclose all

## Basic Examples(2)

RealValuedNumericQ tests whether an object is a real-valued numeric quantity:

RealValuedNumericQ[expr] gives True whenever N[expr] yields a number with head Real:

A general symbolic expression is not a real-valued numeric quantity:

## Scope(9)

Integers and rationals are real-valued numeric quantities:

Approximate reals are real-valued numeric quantities:

RealValuedNumericQ gives True for real-valued mathematical constants:

RealValuedNumericQ gives True for exact expressions representing real values:

Complex numbers are not real-valued quantities:

Exact complex quantities whose imaginary part is zero are real valued:

The number has a real part of and an imaginary part of :

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

gives False:

and give True:  They are both treated as Real:

## Properties & Relations(3)

If Head[N[x]] is Real, then is True:

It is possible for to be True and for N[x] to have head Complex:

This indicates that x has an imaginary part that is exactly zero:

If is True, then is also True:

## Possible Issues(2)

Exact quantities whose imaginary parts vanish may not be identified by RealValuedNumericQ:

If detecting such numbers is important, simplify the expression before testing it:

An exact number and its numerical approximation may give different results for RealValuedNumericQ:

It is not possible to determine if the number is real, as its imaginary part is only approximately zero: