| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version | ||||||||||
Arguments: object
Returns true if the argument is a ratio and returns nil otherwise. Note that an integer (a fixnum or a
bignum) is not a ratio but is a rational. Integers and ratios
partition rationals.
cl-user(7): (ratiop 1) ;; fixnums are not ratios
nil
cl-user(8): (ratiop 1/2)
t
cl-user(9): (ratiop 2/1) ;; Actually the fixnum 2, despite how it
;; is represented
nil
cl-user(10): (ratiop 0.5) ;; floats are not ratios
nil
cl-user(11): (ratiop nil) ;; returns NIL for non-numbers (does not error)
nil
cl-user(12):
See also fixnump, single-float-p, double-float-p, and rationalp.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version | ||||||||||