Fixnums are small exact integers that can be represented without heap allocation (see this note for more information). Larceny never represents a number that can be represented as a fixnum any other way, so programs that can use fixnums will do so automatically. However, operations that work only on fixnums can sometimes be substantially faster than generic operations, and the following primitives are provided for use in those programs that need especially good performance.

All arguments to the following procedures must be fixnums.

__Procedure__`fixnum?``(fixnum?`*obj*) =>*boolean*Returns

`#t`if its argument is a fixnum, and`#f`otherwise.__Procedure__`fx+``(fx+`*fix1 fix2*) =>*fixnum*__Procedure__`fx-``(fx-`*fix1 fix2*) =>*fixnum*__Procedure__`fx--``(fx--`*fix1*) =>*fixnum*__Procedure__`fx*``(fx*`*fix1 fix2*) =>*fixnum*__Procedure__`fx=``(fx=`*fix1 fix2*) =>*boolean*__Procedure__`fx<``(fx<`*fix1 fix2*) =>*boolean*__Procedure__`fx<=``(fx<=`*fix1 fix2*) =>*boolean*Returns

`#t`if*fix1*is less than or equal to*fix2*, and`#f`otherwise.__Procedure__`fx>``(fx>`*fix1 fix2*) =>*boolean*__Procedure__`fx>=``(fx>=`*fix1 fix2*) =>*boolean*Returns

`#t`if*fix1*is greater than or equal to*fix2*, and`#f`otherwise.__Procedure__`fxnegative?``(fxnegative?`*fix*) =>*boolean*Returns

`#t`if its argument is less than zero, and`#f`otherwise.__Procedure__`fxpositive?``(fxpositive?`*fix*) =>*boolean*Returns

`#t`if its argument is greater than zero, and`#f`otherwise.__Procedure__`fxzero?``(fxzero?`*fix*) =>*boolean*__Procedure__`logand``(logand`*fix1 fix2*) =>*fixnum*__Procedure__`logior``(logior`*fix1 fix2*) =>*fixnum*__Procedure__`lognot``(lognot`*fix*) =>*fixnum*__Procedure__`logxor``(logxor`*fix1 fix2*) =>*fixnum*__Procedure__`lsh``(lsh`*fix1 fix2*) =>*fixnum*__Procedure__`most-positive-fixnum``(most-positive-fixnum) =>`*fixnum*__Procedure__`most-negative-fixnum``(most-negative-fixnum) =>`*fixnum*__Procedure__`rsha``(rsha`*fix1 fix2*) =>*fixnum*__Procedure__`rshl``(rshl`*fix1 fix2*) =>*fixnum*

larceny@ccs.neu.edu