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