Next: , Previous: , Up: Unions of Number Types   [Contents][Index]


63.3.2 The category ‘rational

The category of rationals gathers everything that is rational. Practically, it is the union of the integers with the ‘bigq’s.

The category’s predicate is rationalp.

Function: rationalp object

Return t if object is a rational (i.e. a rational integer or a rational quotient), nil otherwise.

(rationalp 0)
     ⇒ t
(rationalp (factorial 100))
     ⇒ t
(rationalp 1/2)
     ⇒ t