Declared NumericsShort-float operatorsFixnum operatorsGoTo Top

Fixnum operators

These fixnum declared-numeric operators are defined in the :gbbopen-tools module:

      Operator       Operation       Example
& the fixnum (& x)
+& + (+& x y z)
-& - (-& x y z)
1+& 1+ (1+& x)
1-& 1- (1-& x)
*& * (*& x y z)
/& / (/& x y z)
=& = (=& x y z)
/=& /= (/=& x y z)
<& < (<& x y z)
<=& <= (<=& x y z)
>& > (>& x y z)
>=& >= (>=& x y z)
abs& abs (abs& x)
bounded-value& bounded-value (bounded-value& x y z)
ceiling& ceiling (ceiling& x divisor)
decf& decf (decf& x delta)
decf-&after decf-after (decf&-after x delta)
decf/delete&-acons decf/delete-acons (decf/delete&-acons
    x delta alist)
evenp& evenp (evenp& x)
fceiling& fceiling (fceiling& x divisor)
floor& floor (floor& x divisor)
ffloor& ffloor (ffloor& x divisor)
fround& fround (fround& x divisor)
ftruncate& ftruncate (ftruncate& x divisor)
incf& incf (incf& x delta)
incf&-after incf-after (incf&-after x delta)
max& max (max& x y z)
min& min (min& x y z)
minusp& minusp (minusp& x)
mod& mod (mod& x divisor)
oddp& oddp (oddp& x)
plusp& plusp (plusp& x)
pushnew/incf&-acons pushnew/incf-acons (pushnew/incf&-acons
    'x delta alist)
round& round (round& x divisor)
truncate& truncate (truncate& x divisor)
zerop& zerop (zerop& x)

The one-argument function coerce& provides convenient fixnum coercion:

  (setf x (coerce& x))
Although (coerce x 'fixnum) is not permitted in Common Lisp, (coerce& x) is equivalent to (truncate x) when the remainder is zero and the returned quotient is a fixnum. Otherwise, (coerce& x) signals an error.


The GBBopen Project


Declared NumericsShort-float operatorsFixnum operatorsGoTo Top