7.2.2 Fixnums
| import: rhombus/fixnum | package: rhombus-lib | 
A fixnum is an integer that fits into a range that has a specialized representation. This range depends on the architecture’s word size and Racket implementation, but it corresponds to integers that fit into a two’s complete representation using either 30, 31, 61, or 63 bits. In some cases, using functions and operators from rhombus/fixnum can reduce run time, but performance improvements (if any) may require unsafe mode via use_unsafe.
The functions exported by rhombus/fixnum explicitly require fixnum arguments and produce fixnum results.
Some operations, like <, statically specialize for performance when all arguments have static information for the Fixnum annotation. There is no performance difference between that inferred specialization and these operators, and a conversion is inferred only when the result value is the same for unspecialized and fixnum-specific operations.
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | 
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | ||
| 
 | ||
| operator | ||
| 
 | 
| function | |
| 
 | |
| function | |
| 
 | |
| function | |
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | 
The fixnum.bits.logical.(>>) operator is like fixnum.bits.(>>), but it fills high bits with 0 instead of the fixnum’s sign bit.
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | |||
| 
 | |||
| operator | |||
| 
 | 
| function | |
| 
 | |
| function | |