
rational(?Rational)

   Succeeds if Rational is a rational number.



Arguments
   ?Rational           Prolog term.

Type
   Type Testing

Description
   Used to test whether Rational is a rational number.




Resatisfiable
      No.

Fail Conditions
      Fails if Rational is not a rational number.



Examples
   
   Success:
   rational(1_3).
   set_flag(prefer_rationals, on), X is 1/3, rational(X).
   Fail:
   rational(1).
   rational(1.0).
   rational('1.0').
   rational(a).
   rational(X).





See Also
   atomic / 1, integer / 1, number / 1, float / 1, real / 1, breal / 1
