Next: Comparison of Numbers, Previous: Float Basics, Up: Numbers
The functions in this section test whether the argument is a number or
whether it is a certain sort of number. The functions integerp
and floatp
can take any type of Lisp object as argument (the
predicates would not be of much use otherwise); but the zerop
predicate requires a number as its argument. See also
integer-or-marker-p
and number-or-marker-p
, in
Predicates on Markers.
This predicate tests whether its argument is a floating point number and returns
t
if so,nil
otherwise.
floatp
does not exist in Emacs versions 18 and earlier.
This predicate tests whether its argument is an integer, and returns
t
if so,nil
otherwise.
This predicate tests whether its argument is a number (either integer or floating point), and returns
t
if so,nil
otherwise.