The 'floatp' predicate function checks if an 'expr' is a floating point number. T is returned if 'expr' is a floating point number, NIL is returned otherwise.
(floatp 1.2) ; returns T - float (floatp '1.2) ; returns T - still a float (setq a 1.234) (floatp a) ; returns T - evaluates to float (floatp 0.0) ; returns T - float zero (floatp 0) ; returns NIL - integer zero (floatp 1) ; returns NIL - integer (floatp #x034) ; returns NIL - integer readmacro (floatp 'a) ; returns NIL - symbol (floatp #\a) ; returns NIL - character (floatp NIL) ; returns NIL - NIL (floatp #(0 1 2)) ; returns NIL - array
See the
floatp
predicate function in the