[ Type Testing | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

real(?Real)

Succeeds if Real is a real (float or breal) number.
Real
Prolog term.

Description

Used to test whether Real is a real number, i.e. either a floating point number (float) or a bounded real number (breal). It could be defined as:
   real(X) :- float(X).
   real(X) :- breal(X).

Modes and Determinism

Fail Conditions

Fails if Real is not a real number

Examples

   Success:
   real(1.0).
   real(0.99__1.01).
   real(3e27).
   real(1e300__1.0Inf).
   Fail:
   real(1).
   real('1.0').
   real(X).



See Also

atomic / 1, float / 1, integer / 1, number / 1, rational / 1, breal / 1