Changes between Version 6 and Version 7 of FixnumsCowan
 Timestamp:
 09/14/16 09:16:59 (9 months ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

FixnumsCowan
v6 v7 59 59 === Basic arithmetic === 60 60 61 The following procedures from R7RSsmall have fixnum equivalents 62 provided by this SRFI. 63 61 The following procedures are the fixnum counterparts of procedures from R7RSsmall: 64 62 {{{ 65 zero? positive? negative? odd?even?66 = < > <=>=67 maxmin68 + *69 abs square exactintegersqrtexpt63 fxzero? fxpositive? fxnegative? fxodd? fxeven? 64 fx= fx< fx> fx<= fx>= 65 fxmax fxmin 66 fx+ fx fx* 67 fxabs fxsquare fxsqrt fxexpt 70 68 }}} 71 69 … … 78 76 * The procedure `fx` accepts either one or two arguments. 79 77 80 * For brevity, the fixnum version of `exactintegersqrt` is called `fxsqrt`.78 * The `fxsqrt` procedure is the counterpart of `exactintegersqrt` rather than `sqrt`. 81 79 82 80 Note that in accordance with the fixnum rule the procedure `fxabs` has undefined 83 results when applied to `fx :least`.81 results when applied to `fxleast`. 84 82 85 83 === Arithmetic with carry === … … 121 119 === Integer division === 122 120 123 All the procedures of DivisionRiastradh have fixnum counterparts provided by 124 this SRFI. Except for the effects of the fixnum rule, the `fx` versions 121 The following procedures are the fixnum counterparts of procedures 122 from [http://srfi.schemers.org/srfi141/srfi141.html SRFI 141]: 123 {{{ 124 fxfloor/ fxfloorquotient fxfloorremainder 125 fxceiling/ fxceilingquotient fxceilingremainder 126 fxtruncate/ fxtruncatequotient fxtruncateremainder 127 fxround/ fxroundquotient fxroundremainder 128 fxeuclidean/ fxeuclideanquotient fxeuclideanremainder 129 fxrbalanced/ fxbalancedquotient fxbalancedremainder 130 }}} 131 Except for the effects of the fixnum rule, the `fx` versions 125 132 have the same arguments and semantics as their generic counterparts. 126 133 127 134 === Bitwise operations === 128 135 129 All the procedures of BitwiseCowan have fixnum counterparts provided by 130 this SRFI. Except for the effects of the fixnum rule, the `fx` versions 136 The following procedures are the fixnum counterparts of procedures 137 from [http://srfi.schemers.org/srfi141/srfi141.html SRFI 141]: 138 {{{ 139 fxnot 140 fxand fxior fxxor fxeqv 141 fxnand fxnor 142 fxandc1 fxandc2 fxorc1 fxorc2 143 144 farithmeticshift fxbitcount fxintegerlength 145 146 fxif 147 fxbitset? fxcopybit fxbitswap 148 fxanybitset? fxeverybitset? 149 fxfirstsetbit 150 151 fxbitfield fxbitfieldany? fxbitfieldevery? 152 fxbitfieldclear fxbitfieldset 153 fxbitfieldreplace fbitfieldreplacesame 154 fxbitfieldrotate fxbitfieldreverse 155 fxbitfieldappend 156 157 fixnum>list list>fixnum 158 fixnum>vector vector>fixnum 159 fxbits 160 fxfold fxforeach fxunfold 161  162 Except for the effects of the fixnum rule, the `fx` versions 131 163 have the same arguments and semantics as their generic counterparts, 132 164 with the following additional modifications: 133 165 166 * The prefix `bitwise` in the SRFI 141 functions is dropped for brevity and compatibility. 167 134 168 * Despite the fixnum rule, the `fxarithmeticshift` procedure produces a defined result on all fixnums by discarding any higherorder bits that do not fit into the fixnum width. 135 169 136 * The fixnum versions of `integer>list` and `list>integer` are called `fixnum>list` and `list>fixnum` respectively. 170 * The `fixnum>list` and `list>fixnum` procedures correspond to the `integer>list` and `list>integer` 171 procedures respectively, and the same for their vector analogues. 137 172 138 173 The following additional bitwise procedure is provided: