Changes between Version 6 and Version 7 of FixnumsCowan


Ignore:
Timestamp:
09/14/16 09:16:59 (9 months ago)
Author:
cowan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FixnumsCowan

    v6 v7  
    5959=== Basic arithmetic === 
    6060 
    61 The following procedures from R7RS-small have fixnum equivalents 
    62 provided by this SRFI. 
    63  
     61The following procedures are the fixnum counterparts of procedures from R7RS-small: 
    6462{{{ 
    65 zero? positive? negative? odd? even? 
    66 = < > <= >= 
    67 max min 
    68 + - * 
    69 abs square exact-integer-sqrt expt 
     63fxzero? fxpositive? fxnegative? fxodd? fxeven? 
     64fx= fx< fx> fx<= fx>= 
     65fxmax fxmin 
     66fx+ fx- fx* 
     67fxabs fxsquare fxsqrt fxexpt 
    7068}}} 
    7169 
     
    7876 * The procedure `fx-` accepts either one or two arguments. 
    7977 
    80  * For brevity, the fixnum version of `exact-integer-sqrt` is called `fxsqrt`. 
     78 * The `fxsqrt` procedure is the counterpart of `exact-integer-sqrt` rather than `sqrt`. 
    8179 
    8280Note that in accordance with the fixnum rule the procedure `fxabs` has undefined 
    83 results when applied to `fx:least`. 
     81results when applied to `fx-least`. 
    8482 
    8583=== Arithmetic with carry === 
     
    121119=== Integer division === 
    122120 
    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 
     121The following procedures are the fixnum counterparts of procedures 
     122from [http://srfi.schemers.org/srfi-141/srfi-141.html SRFI 141]: 
     123{{{ 
     124fxfloor/ fxfloor-quotient fxfloor-remainder 
     125fxceiling/ fxceiling-quotient fxceiling-remainder 
     126fxtruncate/ fxtruncate-quotient fxtruncate-remainder 
     127fxround/ fxround-quotient fxround-remainder 
     128fxeuclidean/ fxeuclidean-quotient fxeuclidean-remainder 
     129fxrbalanced/ fxbalanced-quotient fxbalanced-remainder 
     130}}} 
     131Except for the effects of the fixnum rule, the `fx` versions 
    125132have the same arguments and semantics as their generic counterparts. 
    126133 
    127134=== Bitwise operations === 
    128135 
    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 
     136The following procedures are the fixnum counterparts of procedures 
     137from [http://srfi.schemers.org/srfi-141/srfi-141.html SRFI 141]: 
     138{{{ 
     139fxnot 
     140fxand   fxior   fxxor   fxeqv 
     141fxnand  fxnor  
     142fxandc1 fxandc2 fxorc1  fxorc2  
     143 
     144farithmetic-shift fxbit-count fxinteger-length 
     145 
     146fxif  
     147fxbit-set? fxcopy-bit fxbit-swap 
     148fxany-bit-set? fxevery-bit-set? 
     149fxfirst-set-bit 
     150 
     151fxbit-field fxbit-field-any? fxbit-field-every? 
     152fxbit-field-clear fxbit-field-set 
     153fxbit-field-replace  fbit-field-replace-same 
     154fxbit-field-rotate fxbit-field-reverse 
     155fxbit-field-append 
     156 
     157fixnum->list list->fixnum 
     158fixnum->vector vector->fixnum 
     159fxbits 
     160fxfold fxfor-each fxunfold 
     161||| 
     162Except for the effects of the fixnum rule, the `fx` versions 
    131163have the same arguments and semantics as their generic counterparts, 
    132164with the following additional modifications: 
    133165 
     166* The prefix `bitwise-` in the SRFI 141 functions is dropped for brevity and compatibility. 
     167 
    134168* Despite the fixnum rule, the `fxarithmetic-shift` procedure produces a defined result on all fixnums by discarding any higher-order bits that do not fit into the fixnum width. 
    135169 
    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` 
     171procedures respectively, and the same for their vector analogues. 
    137172 
    138173The following additional bitwise procedure is provided: