Next: , Previous: SLIB Logical Procedures, Up: The Language Compiled


3.4 Fast Integer Calculations

The following primitives are for immediate (30-bit) integer-only arithmetics. The are compiled directly into the corresponding C operations plus some bitshifts if necessary. They are good for speed in case the compiled program uses BOTH generic arithmetics (reals, bignums) and immediate (30-bit) integer arithmetics. These procedures are much faster than corresponding generic procedures taking also reals and bignums. There is no point in using these unless the program as a whole is compiled using generic arithmetics, since otherwise all the arithmetics procedures are compiled directly into corresponding C operations anyway.

Note Bene: These primitives are NOT defined in SCM or its libraries. For non-compiled use they are defined in the file scmhob.scm included in the SCM distribution.

     %negative?  %number?    %>      %>=     %=      %<=     %<
     %positive?  %zero?      %eqv?   %+      %-      %*      %/