Changeset 13793 in project


Ignore:
Timestamp:
03/17/09 03:57:27 (11 years ago)
Author:
Kon Lovett
Message:

Added & renamed routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/err5rs-arithmetic

    r13647 r13793  
    3636==== fx=?
    3737
    38 <procedure>(fx=? FX ...) => BOOLEAN</procedure>
     38<procedure>(fx=? FX...) => BOOLEAN</procedure>
    3939
    4040==== fx<?
    4141
    42 <procedure>(fx<? FX ...) => BOOLEAN</procedure>
     42<procedure>(fx<? FX...) => BOOLEAN</procedure>
    4343
    4444==== fx>?
    4545
    46 <procedure>(fx>? FX ...) => BOOLEAN</procedure>
     46<procedure>(fx>? FX...) => BOOLEAN</procedure>
    4747
    4848==== fx<=?
    4949
    50 <procedure>(fx<=? FX ...) => BOOLEAN</procedure>
     50<procedure>(fx<=? FX...) => BOOLEAN</procedure>
    5151
    5252==== fx>=?
    5353
    54 <procedure>(fx>=? FX ...) => BOOLEAN</procedure>
     54<procedure>(fx>=? FX...) => BOOLEAN</procedure>
     55
     56==== fxzero?
     57
     58<procedure>(fxzero? FX) => BOOLEAN</procedure>
     59
     60==== fxpositive?
     61
     62<procedure>(fxpositive? FX) => BOOLEAN</procedure>
     63
     64==== fxnegative?
     65
     66<procedure>(fxnegative? FX) => BOOLEAN</procedure>
     67
     68==== fxodd?
     69
     70<procedure>(fxodd? FX) => BOOLEAN</procedure>
     71
     72==== fxeven?
     73
     74<procedure>(fxeven? FX) => BOOLEAN</procedure>
     75
     76==== fxmax
     77
     78<procedure>(fxmax FX...) => FIXNUM</procedure>
     79
     80==== fxmin
     81
     82<procedure>(fxmin FX...) => FIXNUM</procedure>
     83
     84==== fxmax-and-min
     85
     86<procedure>(fxmax-and-min FX...) => FIXNUM</procedure>
     87
     88==== fxmodulo
     89
     90<procedure>(fxmodulo FX-N FX-D) => FIXNUM</procedure>
     91
     92==== fxdiv
     93
     94<procedure>(fxdiv FX-N FX-D) => FIXNUM</procedure>
     95
     96==== fxdiv-and-mod
     97
     98<procedure>(fxdiv-and-mod FX-N FX-D) => FIXNUM</procedure>
     99
     100==== fxdiv0
     101
     102<procedure>(fxdiv0 FX-N FX-D) => FIXNUM</procedure>
     103
     104==== fxmod0
     105
     106<procedure>(fxmod0 FX-N FX-D) => FIXNUM</procedure>
     107
     108==== fxdiv0-and-mod0
     109
     110<procedure>(fxdiv0-and-mod0 FX-N FX-D) => FIXNUM</procedure>
     111
     112==== fx*/carry
     113
     114<procedure>(fx*/carry FX1 FX2 FX3) => FIXNUM</procedure>
     115
     116==== fx+/carry
     117
     118<procedure>(fx+/carry FX1 FX2 FX3) => FIXNUM</procedure>
     119
     120==== fx-/carry
     121
     122<procedure>(fx-/carry FX1 FX2 FX3) => FIXNUM</procedure>
     123
     124==== fxarithmetic-shift
     125
     126<procedure>(fxarithmetic-shift FX DIRECTIONAL-AMOUNT) => FIXNUM</procedure>
     127
     128==== fxarithmetic-shift-left
     129
     130<procedure>(fxarithmetic-shift-left FX AMOUNT) => FIXNUM</procedure>
     131
     132==== fxarithmetic-shift-right
     133
     134<procedure>(fxarithmetic-shift-right FX AMOUNT) => FIXNUM</procedure>
     135
     136==== fx+
     137
     138<procedure>(fx+ FX FX2) => FIXNUM</procedure>
     139
     140==== fx-
     141
     142<procedure>(fx- FX [FX2]) => FIXNUM</procedure>
     143
     144==== fx*
     145
     146<procedure>(fx* FX FX2) => FIXNUM</procedure>
     147
     148==== fxand
     149
     150<procedure>(fxand FX...) => FIXNUM</procedure>
     151
     152==== fxior
     153
     154<procedure>(fxior FX...) => FIXNUM</procedure>
     155
     156==== fxxor
     157
     158<procedure>(fxxor FX...) => FIXNUM</procedure>
     159
     160==== fxif
     161
     162<procedure>(fxif MASK TRUE FALSE) => FIXNUM</procedure>
     163
     164==== fxbit-count
     165
     166<procedure>(fxbit-count FX) => FIXNUM</procedure>
     167
     168==== fxlength
     169
     170<procedure>(fxlength FX) => FIXNUM</procedure>
     171
     172==== fxfirst-bit-set
     173
     174<procedure>(fxfirst-bit-set FX) => FIXNUM</procedure>
     175
     176==== fxbit-set?
     177
     178<procedure>(fxbit-set? FX INDEX) => BOOLEAN</procedure>
     179
     180==== fxcopy-bit
     181
     182<procedure>(fxcopy-bit FX INDEX BIT) => FIXNUM</procedure>
     183
     184==== fxbit-field
     185
     186<procedure>(fxbit-field FX START END) => FIXNUM</procedure>
     187
     188==== fxcopy-bit-field
     189
     190<procedure>(fxcopy-bit-field FX-TO START END FX-FROM) => FIXNUM</procedure>
     191
     192==== fxrotate-bit-field
     193
     194<procedure>(fxrotate-bit-field FX START END COUNT) => FIXNUM</procedure>
     195
     196==== fxreverse-bit-field
     197
     198<procedure>(fxreverse-bit-field FX START END) => FIXNUM</procedure>
     199
     200==== Extras
     201
     202(All `$fx...' identifiers are reserved.)
     203
     204==== fx<>?
     205
     206<procedure>(fx<>? FX1 FX2) => BOOLEAN</procedure>
    55207
    56208==== fxcompare
     
    58210<procedure>(fxcompare FX1 FX2) => BOOLEAN</procedure>
    59211
    60 ==== fxzero?
    61 
    62 <procedure>(fxzero? FX) => BOOLEAN</procedure>
    63 
    64 ==== fxpositive?
    65 
    66 <procedure>(fxpositive? FX) => BOOLEAN</procedure>
    67 
    68 ==== fxnegative?
    69 
    70 <procedure>(fxnegative? FX) => BOOLEAN</procedure>
    71 
    72 ==== fxodd?
    73 
    74 <procedure>(fxodd? FX) => BOOLEAN</procedure>
    75 
    76 ==== fxeven?
    77 
    78 <procedure>(fxeven? FX) => BOOLEAN</procedure>
    79 
    80 ==== fxmax
    81 
    82 <procedure>(fxmax FX ...) => FIXNUM</procedure>
    83 
    84 ==== fxmin
    85 
    86 <procedure>(fxmin FX ...) => FIXNUM</procedure>
    87 
    88 ==== fxmax-and-min
    89 
    90 <procedure>(fxmax-and-min FX ...) => FIXNUM</procedure>
    91 
    92 ==== fxmodulo
    93 
    94 <procedure>(fxmodulo FX-N FX-D) => FIXNUM</procedure>
    95 
    96212==== fxabs
    97213
    98214<procedure>(fxabs FX) => FIXNUM</procedure>
    99215
    100 ==== fxpow2log2
     216===== fxnegate
     217
     218<procedure>(fxnegate FX) => FIXNUM</procedure>
     219
     220==== fxadd1
     221
     222<procedure>(fxadd1 FX) => FIXNUM</procedure>
     223
     224==== fxsub1
     225
     226<procedure>(fxsub1 FX) => FIXNUM</procedure>
     227
     228===== fx/
     229
     230<procedure>(fx/ FX1 FX2) => FIXNUM</procedure>
     231
     232==== fxquotient
     233
     234<procedure>(fxquotient FX-N FX-D) => FIXNUM</procedure>
     235
     236==== fxremainder
     237
     238<procedure>(fxremainder FX-N FX-D) => FIXNUM</procedure>
     239
     240===== fxpow2log2
    101241
    102242<procedure>(fxpow2log2 FX) => FIXNUM</procedure>
    103243
    104 ==== fxdiv
    105 
    106 <procedure>(fxdiv FX-N FX-D) => FIXNUM</procedure>
    107 
    108 ==== fxdiv-and-mod
    109 
    110 <procedure>(fxdiv-and-mod FX-N FX-D) => FIXNUM</procedure>
    111 
    112 ==== fxdiv0
    113 
    114 <procedure>(fxdiv0 FX-N FX-D) => FIXNUM</procedure>
    115 
    116 ==== fxmod0
    117 
    118 <procedure>(fxmod0 FX-N FX-D) => FIXNUM</procedure>
    119 
    120 ==== fxdiv0-and-mod0
    121 
    122 <procedure>(fxdiv0-and-mod0 FX-N FX-D) => FIXNUM</procedure>
    123 
    124 ==== fx*/carry
    125 
    126 <procedure>(fx*/carry FX1 FX2 FX3) => FIXNUM</procedure>
    127 
    128 ==== fx+/carry
    129 
    130 <procedure>(fx+/carry FX1 FX2 FX3) => FIXNUM</procedure>
    131 
    132 ==== fx-/carry
    133 
    134 <procedure>(fx-/carry FX1 FX2 FX3) => FIXNUM</procedure>
    135 
    136 ==== fxadd1
    137 
    138 <procedure>(fxadd1 FX) => FIXNUM</procedure>
    139 
    140 ==== fxsub1
    141 
    142 <procedure>(fxsub1 FX) => FIXNUM</procedure>
    143 
    144 ==== fxquotient
    145 
    146 <procedure>(fxquotient FX-N FX-D) => FIXNUM</procedure>
    147 
    148 ==== fxremainder
    149 
    150 <procedure>(fxremainder FX-N FX-D) => FIXNUM</procedure>
    151 
    152 ==== fxarithmetic-shift
    153 
    154 <procedure>(fxarithmetic-shift FX DIRECTIONAL-AMOUNT) => FIXNUM</procedure>
    155 
    156 ==== fxarithmetic-shift-left
    157 
    158 <procedure>(fxarithmetic-shift-left FX AMOUNT) => FIXNUM</procedure>
    159 
    160 ==== fxarithmetic-shift-right
    161 
    162 <procedure>(fxarithmetic-shift-right FX AMOUNT) => FIXNUM</procedure>
    163 
    164 ==== fx-
    165 
    166 <procedure>(fx- FX [FX2]) => FIXNUM</procedure>
    167 
    168 ==== fxand
    169 
    170 <procedure>(fxand FX ...) => FIXNUM</procedure>
    171 
    172 ==== fxior
    173 
    174 <procedure>(fxior FX ...) => FIXNUM</procedure>
    175 
    176 ==== fxxor
    177 
    178 <procedure>(fxxor FX ...) => FIXNUM</procedure>
    179 
    180 ==== fxif
    181 
    182 <procedure>(fxif MASK TRUE FALSE) => FIXNUM</procedure>
    183 
    184 ==== fxbit-count
    185 
    186 <procedure>(fxbit-count FX) => FIXNUM</procedure>
    187 
    188 ==== fxlength
    189 
    190 <procedure>(fxlength FX) => FIXNUM</procedure>
    191 
    192 ==== fxfirst-bit-set
    193 
    194 <procedure>(fxfirst-bit-set FX) => FIXNUM</procedure>
     244===== fxif-not
     245
     246<procedure>(fxif-not MASK TRUE FALSE) => FIXNUM</procedure>
    195247
    196248==== fxlast-bit-set
     
    198250<procedure>(fxlast-bit-set FX) => FIXNUM</procedure>
    199251
    200 ==== fxbit-set?
    201 
    202 <procedure>(fxbit-set? FX INDEX) => BOOLEAN</procedure>
    203 
    204 ==== fxcopy-bit
    205 
    206 <procedure>(fxcopy-bit FX INDEX BIT) => FIXNUM</procedure>
    207 
    208 ==== fxbit-field
    209 
    210 <procedure>(fxbit-field FX START END) => FIXNUM</procedure>
    211 
    212 ==== fxcopy-bit-field
    213 
    214 <procedure>(fxcopy-bit-field FX-TO START END FX-FROM) => FIXNUM</procedure>
    215 
    216 ==== fxrotate-bit-field
    217 
    218 <procedure>(fxrotate-bit-field FX START END COUNT) => FIXNUM</procedure>
    219 
    220 ==== fxreverse-bit-field
    221 
    222 <procedure>(fxreverse-bit-field FX START END) => FIXNUM</procedure>
     252===== fixnum->string
     253
     254<procedure>(fixnum->string FX [RADIX]) => STRING</procedure>
     255
     256===== *fx=?
     257
     258<macro>(*fx=? FX [FX1...]) => BOOLEAN</macro>
     259
     260===== *fx<?
     261
     262<macro>(*fx<? FX [FX1...]) => BOOLEAN</macro>
     263
     264===== *fx>?
     265
     266<macro>(*fx>? FX [FX1...]) => BOOLEAN</macro>
     267
     268===== *fx<=?
     269
     270<macro>(*fx<=? FX [FX1...]) => BOOLEAN</macro>
     271
     272===== *fx>=?
     273
     274<macro>(*fx>=? FX [FX1...]) => BOOLEAN</macro>
     275
     276===== *fxmax
     277
     278<macro>(*fxmax FX [FX1...]) => FIXNUM</macro>
     279
     280===== *fxmin
     281
     282<macro>(*fxmin FX [FX1...]) => FIXNUM</macro>
     283
     284===== *fxand
     285
     286<macro>(*fxand FX [FX1...]) => FIXNUM</macro>
     287
     288===== *fxior
     289
     290<macro>(*fxior FX [FX1...]) => FIXNUM</macro>
     291
     292===== *fxxor
     293
     294<macro>(*fxxor FX [FX1...]) => FIXNUM</macro>
     295
     296===== *fx+
     297
     298<macro>(*fx+ FX [FX1...]) => FIXNUM</macro>
     299
     300===== *fx-
     301
     302<macro>(*fx- FX [FX1...]) => FIXNUM</macro>
     303
     304===== *fx*
     305
     306<macro>(*fx* FX [FX1...]) => FIXNUM</macro>
     307
     308===== *fx/
     309
     310<macro>(*fx/ FX [FX1...]) => FIXNUM</macro>
     311
     312
     313=== Flonum Arithmetic
     314
     315ERR5RS flonum functions.
     316
     317See [[http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-12.html#node_sec_11.3|Flonums]]
     318
     319==== real->flonum
     320
     321<procedure>(real->flonum NUMBER) => FLONUM</procedure>
     322
     323==== fixnum->flonum
     324
     325<procedure>(fixnum->flonum FX) => FLONUM</procedure>
     326
     327==== fl=?
     328
     329<procedure>(fl=? FP...) => BOOLEAN</procedure>
     330
     331==== fl<?
     332
     333<procedure>(fl<? FP...) => BOOLEAN</procedure>
     334
     335==== fl>?
     336
     337<procedure>(fl>? FP...) => BOOLEAN</procedure>
     338
     339==== fl<=?
     340
     341<procedure>(fl<=? FP...) => BOOLEAN</procedure>
     342
     343==== fl>=?
     344
     345<procedure>(fl>=? FP...) => BOOLEAN</procedure>
     346
     347==== flinteger?
     348
     349<procedure>(flinteger? FP) => BOOLEAN</procedure>
     350
     351==== flzero?
     352
     353<procedure>(flzero? FP) => BOOLEAN</procedure>
     354
     355==== flpositive?
     356
     357<procedure>(flpositive? FP) => BOOLEAN</procedure>
     358
     359==== flnegative?
     360
     361<procedure>(flnegative? FP) => BOOLEAN</procedure>
     362
     363==== flodd?
     364
     365<procedure>(flodd? FP) => BOOLEAN</procedure>
     366
     367==== fleven?
     368
     369<procedure>(fleven? FP) => BOOLEAN</procedure>
     370
     371==== flfinite?
     372
     373<procedure>(flfinite? FP) => BOOLEAN</procedure>
     374
     375==== flinfinite?
     376
     377<procedure>(flinfinite? FP) => BOOLEAN</procedure>
     378
     379==== flnan?
     380
     381<procedure>(flnan? FP) => BOOLEAN</procedure>
     382
     383==== fl+
     384
     385<procedure>(fl+ FP...) => FLONUM</procedure>
     386
     387==== fl*
     388
     389<procedure>(fl* FP...) => FLONUM</procedure>
     390
     391==== fl-
     392
     393<procedure>(fl- FP...) => FLONUM</procedure>
     394
     395==== fl/
     396
     397<procedure>(fl/ FP...) => FLONUM</procedure>
     398
     399==== flmax
     400
     401<procedure>(flmax FP...) => FLONUM</procedure>
     402
     403==== flmin
     404
     405<procedure>(flmin FP...) => FLONUM</procedure>
     406
     407==== flmax-and-min
     408
     409<procedure>(flmax-and-min FP...) => FLONUM</procedure>
     410
     411==== flabs
     412
     413<procedure>(flabs FP) => FLONUM</procedure>
     414
     415==== fltruncate
     416
     417<procedure>(fltruncate FP) => FLONUM</procedure>
     418
     419==== flfloor
     420
     421<procedure>(flfloor FP) => FLONUM</procedure>
     422
     423==== flceiling
     424
     425<procedure>(flceiling FP) => FLONUM</procedure>
     426
     427==== flround
     428
     429<procedure>(flround FP) => FLONUM</procedure>
     430
     431==== fldiv
     432
     433<procedure>(fldiv FL-N FL-D) => FLONUM</procedure>
     434
     435==== flmod
     436
     437<procedure>(flmod FL-N FL-D) => FLONUM</procedure>
     438
     439==== fldiv-and-mod
     440
     441<procedure>(fldiv-and-mod FL-N FL-D) => FLONUM</procedure>
     442
     443==== fldiv0
     444
     445<procedure>(fldiv0 FL-N FL-D) => FLONUM</procedure>
     446
     447==== flmod0
     448
     449<procedure>(flmod0 FL-N FL-D) => FLONUM</procedure>
     450
     451==== fldiv0-and-mod0
     452
     453<procedure>(fldiv0-and-mod0 FL-N FL-D) => FLONUM</procedure>
     454
     455==== flexp
     456
     457<procedure>(flexp FP) => FLONUM</procedure>
     458
     459==== fllog
     460
     461<procedure>(fllog FP [BASE]) => FLONUM</procedure>
     462
     463==== flsin
     464
     465<procedure>(flsin FP) => FLONUM</procedure>
     466
     467==== flcos
     468
     469<procedure>(flcos FP) => FLONUM</procedure>
     470
     471==== fltan
     472
     473<procedure>(fltan FP) => FLONUM</procedure>
     474
     475==== flasin
     476
     477<procedure>(flasin FP) => FLONUM</procedure>
     478
     479==== flacos
     480
     481<procedure>(flacos FP) => FLONUM</procedure>
     482
     483==== flatan
     484
     485<procedure>(flatan FP [FP2]) => FLONUM</procedure>
     486
     487==== flsqrt
     488
     489<procedure>(flsqrt FP) => FLONUM</procedure>
     490
     491==== flexpt
     492
     493<procedure>(flexpt FP EXP) => FLONUM</procedure>
     494
     495==== flnumerator
     496
     497<procedure>(flnumerator FP) => FLONUM</procedure>
     498
     499==== fldenominator
     500
     501<procedure>(fldenominator FP) => FLONUM</procedure>
    223502
    224503==== Extras
    225504
    226 ===== fixnum->string
    227 
    228 <procedure>(fixnum->string FX [RADIX]) => STRING</procedure>
    229 
    230 ===== fxif-not
    231 
    232 <procedure>(fxif-not MASK TRUE FALSE) => FIXNUM</procedure>
    233 
    234 ===== fxnegate
    235 
    236 <procedure>(fxnegate FX) => FIXNUM</procedure>
    237 
    238 ===== fxpow2log2
    239 
    240 <procedure>(fxpow2log2 FX) => FIXNUM</procedure>
    241 
    242 ===== fx=?#
    243 
    244 <procedure>(fx=? FX [FX1 ...]) => BOOLEAN</procedure>
    245 
    246 ===== fx<?#
    247 
    248 <procedure>(fx<? FX [FX1 ...]) => BOOLEAN</procedure>
    249 
    250 ===== fx>?#
    251 
    252 <procedure>(fx>? FX [FX1 ...]) => BOOLEAN</procedure>
    253 
    254 ===== fx<=?#
    255 
    256 <procedure>(fx<=? FX [FX1 ...]) => BOOLEAN</procedure>
    257 
    258 ===== fx>=?#
    259 
    260 <procedure>(fx>=? FX [FX1 ...]) => BOOLEAN</procedure>
    261 
    262 ===== fx-#
    263 
    264 <procedure>(fx-# FX [FX1 ...]) => FIXNUM</procedure>
    265 
    266 ===== fx+#
    267 
    268 <procedure>(fx+# FX [FX1 ...]) => FIXNUM</procedure>
    269 
    270 ===== fx*#
    271 
    272 <procedure>(fx*# FX [FX1 ...]) => FIXNUM</procedure>
    273 
    274 ===== fx/#
    275 
    276 <procedure>(fx/# FX [FX1 ...]) => FIXNUM</procedure>
    277 
    278 
    279 === Flonum Arithmetic
    280 
    281 ERR5RS flonum functions.
    282 
    283 See [[http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-12.html#node_sec_11.3|Flonums]]
    284 
    285 ==== real->flonum
    286 
    287 <procedure>(real->flonum NUMBER) => FLONUM</procedure>
    288 
    289 ==== fixnum->flonum
    290 
    291 <procedure>(fixnum->flonum FX) => FLONUM</procedure>
    292 
    293 ==== fl=?
    294 
    295 <procedure>(fl=? FL ...) => BOOLEAN</procedure>
    296 
    297 ==== fl<?
    298 
    299 <procedure>(fl<? FL ...) => BOOLEAN</procedure>
    300 
    301 ==== fl>?
    302 
    303 <procedure>(fl>? FL ...) => BOOLEAN</procedure>
    304 
    305 ==== fl<=?
    306 
    307 <procedure>(fl<=? FL ...) => BOOLEAN</procedure>
    308 
    309 ==== fl>=?
    310 
    311 <procedure>(fl>=? FL ...) => BOOLEAN</procedure>
     505(All `$fl...' identifiers are reserved.)
     506
     507==== fl<>?
     508
     509<procedure>(fl<>? FP1 FP2) => BOOLEAN</procedure>
    312510
    313511==== flcompare
    314512
    315 <procedure>(flcompare FL1 FL2) => BOOLEAN</procedure>
    316 
    317 ==== flinteger?
    318 
    319 <procedure>(flinteger? FL) => BOOLEAN</procedure>
    320 
    321 ==== flzero?
    322 
    323 <procedure>(flzero? FL) => BOOLEAN</procedure>
    324 
    325 ==== flpositive?
    326 
    327 <procedure>(flpositive? FL) => BOOLEAN</procedure>
    328 
    329 ==== flnegative?
    330 
    331 <procedure>(flnegative? FL) => BOOLEAN</procedure>
    332 
    333 ==== flodd?
    334 
    335 <procedure>(flodd? FL) => BOOLEAN</procedure>
    336 
    337 ==== fleven?
    338 
    339 <procedure>(fleven? FL) => BOOLEAN</procedure>
    340 
    341 ==== flfinite?
    342 
    343 <procedure>(flfinite? FL) => BOOLEAN</procedure>
    344 
    345 ==== flinfinite?
    346 
    347 <procedure>(flinfinite? FL) => BOOLEAN</procedure>
    348 
    349 ==== flnan?
    350 
    351 <procedure>(flnan? FL) => BOOLEAN</procedure>
    352 
    353 ==== fl+
    354 
    355 <procedure>(fl+ FL ...) => FLONUM</procedure>
    356 
    357 ==== fl*
    358 
    359 <procedure>(fl* FL ...) => FLONUM</procedure>
    360 
    361 ==== fl-
    362 
    363 <procedure>(fl- FL ...) => FLONUM</procedure>
    364 
    365 ==== fl/
    366 
    367 <procedure>(fl/ FL ...) => FLONUM</procedure>
    368 
    369 ==== flmax
    370 
    371 <procedure>(flmax FL ...) => FLONUM</procedure>
    372 
    373 ==== flmin
    374 
    375 <procedure>(flmin FL ...) => FLONUM</procedure>
    376 
    377 ==== flmax-and-min
    378 
    379 <procedure>(flmax-and-min FL ...) => FLONUM</procedure>
    380 
    381 ==== flabs
    382 
    383 <procedure>(flabs FL) => FLONUM</procedure>
     513<procedure>(flcompare FP1 FP2) => BOOLEAN</procedure>
    384514
    385515==== flfraction
    386516
    387 <procedure>(flfraction FL) => FLONUM</procedure>
    388 
    389 ==== fltruncate
    390 
    391 <procedure>(fltruncate FL) => FLONUM</procedure>
    392 
    393 ==== flfloor
    394 
    395 <procedure>(flfloor FL) => FLONUM</procedure>
    396 
    397 ==== flceiling
    398 
    399 <procedure>(flceiling FL) => FLONUM</procedure>
    400 
    401 ==== flround
    402 
    403 <procedure>(flround FL) => FLONUM</procedure>
    404 
    405 ==== fldiv
    406 
    407 <procedure>(fldiv FL-N FL-D) => FLONUM</procedure>
    408 
    409 ==== flmod
    410 
    411 <procedure>(flmod FL-N FL-D) => FLONUM</procedure>
    412 
    413 ==== fldiv-and-mod
    414 
    415 <procedure>(fldiv-and-mod FL-N FL-D) => FLONUM</procedure>
    416 
    417 ==== fldiv0
    418 
    419 <procedure>(fldiv0 FL-N FL-D) => FLONUM</procedure>
    420 
    421 ==== flmod0
    422 
    423 <procedure>(flmod0 FL-N FL-D) => FLONUM</procedure>
    424 
    425 ==== fldiv0-and-mod0
    426 
    427 <procedure>(fldiv0-and-mod0 FL-N FL-D) => FLONUM</procedure>
    428 
    429 ==== flexp
    430 
    431 <procedure>(flexp FL) => FLONUM</procedure>
    432 
    433 ==== fllog
    434 
    435 <procedure>(fllog FL [BASE]) => FLONUM</procedure>
    436 
    437 ==== flsin
    438 
    439 <procedure>(flsin FL) => FLONUM</procedure>
    440 
    441 ==== flcos
    442 
    443 <procedure>(flcos FL) => FLONUM</procedure>
    444 
    445 ==== fltan
    446 
    447 <procedure>(fltan FL) => FLONUM</procedure>
    448 
    449 ==== flasin
    450 
    451 <procedure>(flasin FL) => FLONUM</procedure>
    452 
    453 ==== flacos
    454 
    455 <procedure>(flacos FL) => FLONUM</procedure>
    456 
    457 ==== flatan
    458 
    459 <procedure>(flatan FL [FL2]) => FLONUM</procedure>
    460 
    461 ==== flsqrt
    462 
    463 <procedure>(flsqrt FL) => FLONUM</procedure>
    464 
    465 ==== flexpt
    466 
    467 <procedure>(flexpt FL EXP) => FLONUM</procedure>
    468 
    469 ==== flnumerator
    470 
    471 <procedure>(flnumerator FL) => FLONUM</procedure>
    472 
    473 ==== fldenominator
    474 
    475 <procedure>(fldenominator FL) => FLONUM</procedure>
     517<procedure>(flfraction FP) => FLONUM</procedure>
     518
     519===== flnegate
     520
     521<procedure>(flnegate FP) => FLONUM</procedure>
     522
     523===== *fl=?
     524
     525<macro>(*fl=? FP [FP1...]) => BOOLEAN</macro>
     526
     527===== *fl<?
     528
     529<macro>(*fl<? FP [FP1...]) => BOOLEAN</macro>
     530
     531===== *fl>?
     532
     533<macro>(*fl>? FP [FP1...]) => BOOLEAN</macro>
     534
     535===== *fl<=?
     536
     537<macro>(*fl<=? FP [FP1...]) => BOOLEAN</macro>
     538
     539===== *fl>=?
     540
     541<macro>(*fl>=? FP [FP1...]) => BOOLEAN</macro>
     542
     543===== *flmax
     544
     545<macro>(*flmax FP [FP1...]) => FIXNUM</macro>
     546
     547===== *flmin
     548
     549<macro>(*flmin FP [FP1...]) => FIXNUM</macro>
     550
     551===== *fland
     552
     553<macro>(*fland FP [FP1...]) => FIXNUM</macro>
     554
     555===== *flior
     556
     557<macro>(*flior FP [FP1...]) => FIXNUM</macro>
     558
     559===== *flxor
     560
     561<macro>(*flxor FP [FP1...]) => FIXNUM</macro>
     562
     563===== *fl+
     564
     565<macro>(*fl+ FP [FP1...]) => FIXNUM</macro>
     566
     567===== *fl-
     568
     569<macro>(*fl- FP [FP1...]) => FIXNUM</macro>
     570
     571===== *fl*
     572
     573<macro>(*fl* FP [FP1...]) => FIXNUM</macro>
     574
     575===== *fl/
     576
     577<macro>(*fl/ FP [FP1...]) => FIXNUM</macro>
     578
     579
     580=== Bitwise Arithmetic
     581
     582ERR5RS bitwise functions.
     583
     584See [[http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-12.html#node_sec_11.1|Exact bitwise arithmetic]]
     585
     586==== bitwise-if
     587
     588<procedure>(bitwise-if MASK TRUE FALSE) => INTEGER</procedure>
     589
     590==== bitwise-test?
     591
     592<procedure>(bitwise-test? VALUE1 VALUE2) => BOOLEAN</procedure>
     593
     594==== bitwise-bit-count
     595
     596<procedure>(bitwise-bit-count VALUE) => INTEGER</procedure>
     597
     598==== bitwise-length
     599
     600<procedure>(bitwise-length VALUE) => INTEGER</procedure>
     601
     602==== bitwise-first-bit-set
     603
     604<procedure>(bitwise-first-bit-set VALUE) => INTEGER</procedure>
     605
     606==== bitwise-bit-set?
     607
     608<procedure>(bitwise-bit-set? VALUE INDEX) => BOOLEAN</procedure>
     609
     610==== bitwise-copy-bit
     611
     612<procedure>(bitwise-copy-bit TO START BIT) => INTEGER</procedure>
     613
     614==== bitwise-bit-field
     615
     616<procedure>(bitwise-bit-field VALUE START END) => INTEGER</procedure>
     617
     618==== bitwise-copy-bit-field
     619
     620<procedure>(bitwise-copy-bit-field TO START END FROM) => INTEGER</procedure>
     621
     622==== bitwise-rotate-bit-field
     623
     624<procedure>(bitwise-rotate-bit-field VALUE START END COUNT) => INTEGER</procedure>
     625
     626==== bitwise-reverse
     627
     628<procedure>(bitwise-reverse VALUE COUNT) => INTEGER</procedure>
     629
     630==== bitwise-reverse-bit-field
     631
     632<procedure>(bitwise-reverse-bit-field VALUE START END) => INTEGER</procedure>
     633
     634==== bitwise-list->integer
     635
     636<procedure>(bitwise-list->integer LIST) => INTEGER</procedure>
     637
     638==== bitwise-integer->list
     639
     640<procedure>(bitwise-integer->list VALUE [LENGTH]) => LIST</procedure>
     641
     642==== bitwise-arithmetic-shift
     643
     644<procedure>(bitwise-arithmetic-shift VALUE DIRECTIONAL-COUNT) => INTEGER</procedure>
     645
     646==== bitwise-arithmetic-shift-left
     647
     648<procedure>(bitwise-arithmetic-shift-left VALUE COUNT) => INTEGER</procedure>
     649
     650==== bitwise-arithmetic-shift-right
     651
     652<procedure>(bitwise-arithmetic-shift-right VALUE COUNT) => INTEGER</procedure>
    476653
    477654==== Extras
    478655
    479 ===== flnegate
    480 
    481 <procedure>(flnegate FL) => FLONUM</procedure>
    482 
    483 
    484 === Bitwise Arithmetic
    485 
    486 ERR5RS bitwise functions.
    487 
    488 See [[http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-12.html#node_sec_11.1|Exact bitwise arithmetic]]
    489 
    490 ==== bitwise-if
    491 
    492 <procedure>(bitwise-if MASK TRUE FALSE) => INTEGER</procedure>
    493 
    494 ==== bitwise-test?
    495 
    496 <procedure>(bitwise-test? VALUE1 VALUE2) => BOOLEAN</procedure>
    497 
    498 ==== bitwise-bit-count
    499 
    500 <procedure>(bitwise-bit-count VALUE) => INTEGER</procedure>
    501 
    502 ==== bitwise-length
    503 
    504 <procedure>(bitwise-length VALUE) => INTEGER</procedure>
    505 
    506 ==== bitwise-first-bit-set
    507 
    508 <procedure>(bitwise-first-bit-set VALUE) => INTEGER</procedure>
     656===== pow2log2
     657
     658<procedure>(pow2log2 VALUE) => INTEGER</procedure>
     659
     660Returns {{(* 2 (log2 VALUE))}}, but more efficient.
    509661
    510662==== bitwise-last-bit-set
     
    512664<procedure>(bitwise-last-bit-set VALUE) => INTEGER</procedure>
    513665
    514 ==== bitwise-bit-set?
    515 
    516 <procedure>(bitwise-bit-set? VALUE INDEX) => BOOLEAN</procedure>
    517 
    518 ==== bitwise-copy-bit
    519 
    520 <procedure>(bitwise-copy-bit TO START BIT) => INTEGER</procedure>
    521 
    522 ==== bitwise-bit-field
    523 
    524 <procedure>(bitwise-bit-field VALUE START END) => INTEGER</procedure>
    525 
    526 ==== bitwise-copy-bit-field
    527 
    528 <procedure>(bitwise-copy-bit-field TO START END FROM) => INTEGER</procedure>
    529 
    530 ==== bitwise-rotate-bit-field
    531 
    532 <procedure>(bitwise-rotate-bit-field VALUE START END COUNT) => INTEGER</procedure>
    533 
    534 ==== bitwise-reverse
    535 
    536 <procedure>(bitwise-reverse VALUE COUNT) => INTEGER</procedure>
    537 
    538 ==== bitwise-reverse-bit-field
    539 
    540 <procedure>(bitwise-reverse-bit-field VALUE START END) => INTEGER</procedure>
    541 
    542 ==== bitwise-list->integer
    543 
    544 <procedure>(bitwise-list->integer LIST) => INTEGER</procedure>
    545 
    546 ==== bitwise-integer->list
    547 
    548 <procedure>(bitwise-integer->list VALUE [LENGTH]) => LIST</procedure>
    549 
    550 ==== bitwise-arithmetic-shift
    551 
    552 <procedure>(bitwise-arithmetic-shift VALUE DIRECTIONAL-COUNT) => INTEGER</procedure>
    553 
    554 ==== bitwise-arithmetic-shift-left
    555 
    556 <procedure>(bitwise-arithmetic-shift-left VALUE COUNT) => INTEGER</procedure>
    557 
    558 ==== bitwise-arithmetic-shift-right
    559 
    560 <procedure>(bitwise-arithmetic-shift-right VALUE COUNT) => INTEGER</procedure>
    561 
    562 ==== Extras
    563 
    564666===== bitwise-if-not
    565667
     
    567669
    568670Merge under not mask.
    569 
    570 ===== pow2log2
    571 
    572 <procedure>(pow2log2 VALUE) => INTEGER</procedure>
    573 
    574 Returns {{(* 2 (log2 VALUE))}}, but more efficient.
    575671
    576672===== boolean->bit
Note: See TracChangeset for help on using the changeset viewer.