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