From 54470aa395a2c000334884e559e3a264c6d16d4b Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 9 Aug 2017 13:00:12 +0000 Subject: [PATCH] Initial file --- docs/api/srfi/143.md | 162 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 docs/api/srfi/143.md diff --git a/docs/api/srfi/143.md b/docs/api/srfi/143.md new file mode 100644 index 00000000..dfe630f0 --- /dev/null +++ b/docs/api/srfi/143.md @@ -0,0 +1,162 @@ +--- +layout: main +title: API +--- + +# SRFI 143 - Fixnums + +This SRFI describes arithmetic procedures applicable to a limited range of exact integers only. These procedures are semantically similar to the corresponding generic-arithmetic procedures, but allow more efficient implementations. + +See the [SRFI document](http://srfi.schemers.org/srfi-143/srfi-143.html) for more information. + +## Constants +[`fx-width`](#fx-width) +[`fx-greatest`](#fx-greatest) +[`fx-least`](#fx-least) + +## Predicates +[`fixnum`](#fixnum?) +[`fx=?`](#fx) +[`fx?`](#fx-2) +[`fx<=?`](#fx-3) +[`fx>=?`](#fx-4) +[`fxzero?`](#fxzero) +[`fxpositive?`](#fxpositive) +[`fxnegative?`](#fxnegative) +[`fxodd?`](#fxodd) +[`fxeven?`](#fxeven) +[`fxmax`](#fxmax) +[`fxmin`](#fxmin) + +## Basic arithmetic +[`fx+`](#fx-5) +[`fx-`](#fx-) +[`fx*`](#fx-6) +[`fxneg`](#fxneg) +[`fxquotient`](#fxquotient) +[`fxremainder`](#fxremainder) +[`fxabs`](#fxabs) +[`fxsquare`](#fxsquare) +[`fxsqrt`](#fxsqrt) + +# Bitwise operations +[`fxnot`](#fxnot) +[`fxand`](#fxand) +[`fxior`](#fxior) +[`fxxor`](#fxxor) +[`fxarithmetic-shift`](#fxarithmetic-shift) +[`fxarithmetic-shift-left`](#fxarithmetic-shift-left) +[`fxarithmetic-shift-right`](#fxarithmetic-shift-right) +[`fxbit-count`](#fxbit-count) +[`fxlength`](#fxlength) +[`fxif`](#fxif) +[`fxbit-set?`](#fxbit-set) +[`fxcopy-bit`](#fxcopy-bit) +[`fxfirst-set-bit`](#fxfirst-set-bit) +[`fxbit-field`](#fxbit-field) +[`fxbit-field-rotate`](#fxbit-field-rotate) +[`fxbit-field-reverse`](#fxbit-field-reverse) + +# fx-width + + (fx-width) + +Bound to the value `w` that specifies the implementation-defined fixnum integer range. + +# fx-greatest + + (fx-greatest) + +Returns value of the largest representable fixnum. + +# fx-least + + (fx-least) + +Returns value of the smallest representable fixnum. + +# fixnum? + + (fixnum? obj) + +Returns `#t` if `obj` is an exact integer within the fixnum range, and `#f` otherwise. + +# fx=? + + (fx=? i j) + +Semantically equivalent to `=`. + +# fx? + +# fx<=? + +# fx>=? + +# fxzero? + +# fxpositive? + +# fxnegative? + +# fxodd? + +# fxeven? + +# fxmax + +# fxmin + +# fx+ + +# fx- + +# fx* + +# fxneg + +# fxquotient + +# fxremainder + +# fxabs + +# fxsquare + +# fxsqrt + +# fxnot + +# fxand + +# fxior + +# fxxor + +# fxarithmetic-shift + +# fxarithmetic-shift-left + +# fxarithmetic-shift-right + +# fxbit-count + +# fxlength + +# fxif + +# fxbit-set? + +# fxcopy-bit + +# fxfirst-set-bit + +# fxbit-field + +# fxbit-field-rotate + +# fxbit-field-reverse +