Ifix
Coerce to an integer
Ifix simply returns any integer argument unchanged, returning
0 on a non-integer argument. Also see nfix, see rfix, see
realfix and see fix for analogous functions that coerce to a
natural number, a rational number, a real, and a number, respectively.
Ifix has a guard of t.
Function: ifix
(defun ifix (x)
(declare (xargs :guard t))
(if (integerp x) x 0))
Subtopics
- Std/basic/ifix
- Rules about ifix.