Changeset 13794 in project


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

Save.

Location:
release/4/err5rs-arithmetic/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-bitwise.scm

    r13778 r13794  
    316316  bitwise-arithmetic-shift bitwise-arithmetic-shift-left bitwise-arithmetic-shift-right
    317317  ; Extras
     318  pow2log2
    318319  bitwise-last-bit-set
    319320  bitwise-if-not
    320321  boolean->bit
    321   pow2log2
    322322  *bitwise-if
    323323  *bitwise-test?
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-fixnums.scm

    r13778 r13794  
    186186  fxadd1 fxsub1
    187187  fx/ fxquotient fxremainder
     188  fxpow2log2
    188189  fxif-not
    189190  fxlast-bit-set
    190   fxpow2log2
    191191  fixnum->string
    192192  ; Macros
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-flonums.scm

    r13778 r13794  
    144144  flnegate
    145145  ; Macros
    146   ~fl=? ~fl<? ~fl>? ~fl<=? ~fl>=? ~fl<>?
    147   ~flmax ~flmin
    148   ~fl- ~fl+ ~fl* ~fl/
     146  *fl=? *fl<? *fl>? *fl<=? *fl>=? *fl<>?
     147  *flmax *flmin
     148  *fl- *fl+ *fl* *fl/
    149149  ; Macro helpers
    150150  $fp= $fp< $fp> $fp>= $fp<= $fp<>?
     
    426426;;
    427427
    428 (define-syntax ~fl=?
     428(define-syntax *fl=?
    429429  (syntax-rules ()
    430430    ((_ ?x)
     
    433433      ($fp= ?x ?y) )
    434434    ((_ ?x ?y ?rest ...)
    435       (and ($fp= ?x ?y) (~fl=? ?y ?rest ...)) ) ) )
    436 
    437 (define-syntax ~fl<?
     435      (and ($fp= ?x ?y) (*fl=? ?y ?rest ...)) ) ) )
     436
     437(define-syntax *fl<?
    438438  (syntax-rules ()
    439439    ((_ ?x)
     
    442442      ($fp< ?x ?y) )
    443443    ((_ ?x ?y ?rest ...)
    444       (and ($fp< ?x ?y) (~fl<? ?y ?rest ...)) ) ) )
    445 
    446 (define-syntax ~fl>?
     444      (and ($fp< ?x ?y) (*fl<? ?y ?rest ...)) ) ) )
     445
     446(define-syntax *fl>?
    447447  (syntax-rules ()
    448448    ((_ ?x)
     
    451451      ($fp> ?x ?y) )
    452452    ((_ ?x ?y ?rest ...)
    453       (and ($fp> ?x ?y) (~fl>? ?y ?rest ...)) ) ) )
    454 
    455 (define-syntax ~fl<=?
     453      (and ($fp> ?x ?y) (*fl>? ?y ?rest ...)) ) ) )
     454
     455(define-syntax *fl<=?
    456456  (syntax-rules ()
    457457    ((_ ?x)
     
    460460      ($fp<= ?x ?y) )
    461461    ((_ ?x ?y ?rest ...)
    462       (and ($fp<= ?x ?y) (~fl<=? ?y ?rest ...)) ) ) )
    463 
    464 (define-syntax ~fl>=?
     462      (and ($fp<= ?x ?y) (*fl<=? ?y ?rest ...)) ) ) )
     463
     464(define-syntax *fl>=?
    465465  (syntax-rules ()
    466466    ((_ ?x)
     
    469469      ($fp>= ?x ?y) )
    470470    ((_ ?x ?y ?rest ...)
    471       (and ($fp>= ?x ?y) (~fl>=? ?y ?rest ...)) ) ) )
    472 
    473 (define-syntax ~fl<>?
     471      (and ($fp>= ?x ?y) (*fl>=? ?y ?rest ...)) ) ) )
     472
     473(define-syntax *fl<>?
    474474  (syntax-rules ()
    475475    ((_ ?x)
     
    478478      ($fp<> ?x ?y) )
    479479    ((_ ?x ?y ?rest ...)
    480       (and ($fp<> ?x ?y) (~fl<>? ?y ?rest ...)) ) ) )
    481 
    482 ;;
    483 
    484 (define-syntax ~flmax
     480      (and ($fp<> ?x ?y) (*fl<>? ?y ?rest ...)) ) ) )
     481
     482;;
     483
     484(define-syntax *flmax
    485485  (syntax-rules ()
    486486    ((_ ?x)
     
    489489      ($fpmax ?x ?y) )
    490490    ((_ ?x ?y ?rest ...)
    491       ($fpmax ?x (~flmax ?y ?rest ...)) ) ) )
    492 
    493 (define-syntax ~flmin
     491      ($fpmax ?x (*flmax ?y ?rest ...)) ) ) )
     492
     493(define-syntax *flmin
    494494  (syntax-rules ()
    495495    ((_ ?x)
     
    498498      ($fpmin ?x ?y) )
    499499    ((_ ?x ?y ?rest ...)
    500       ($fpmin ?x (~flmin ?y ?rest ...)) ) ) )
    501 
    502 ;;
    503 
    504 (define-syntax ~fl-
     500      ($fpmin ?x (*flmin ?y ?rest ...)) ) ) )
     501
     502;;
     503
     504(define-syntax *fl-
    505505  (syntax-rules ()
    506506    ((_ ?x)
     
    509509      ($fp- ?x ?y) )
    510510    ((_ ?x ?y ?rest ...)
    511       ($fp- ?x (~fl- ?y ?rest ...) ) ) ) )
    512 
    513 (define-syntax ~fl+
     511      ($fp- ?x (*fl- ?y ?rest ...) ) ) ) )
     512
     513(define-syntax *fl+
    514514  (syntax-rules ()
    515515    ((_ ?x)
     
    518518      ($fp+ ?x ?y) )
    519519    ((_ ?x ?y ?rest ...)
    520       ($fp+ ?x (~fl+ ?y ?rest ...) ) ) ) )
    521 
    522 (define-syntax ~fl*
     520      ($fp+ ?x (*fl+ ?y ?rest ...) ) ) ) )
     521
     522(define-syntax *fl*
    523523  (syntax-rules ()
    524524    ((_ ?x)
     
    527527      ($fp* ?x ?y) )
    528528    ((_ ?x ?y ?rest ...)
    529       ($fp* ?x (~fl* ?y ?rest ...) ) ) ) )
    530 
    531 (define-syntax ~fl/
     529      ($fp* ?x (*fl* ?y ?rest ...) ) ) ) )
     530
     531(define-syntax *fl/
    532532  (syntax-rules ()
    533533    ((_ ?x)
     
    536536      ($fp/ ?x ?y) )
    537537    ((_ ?x ?y ?rest ...)
    538       ($fp/ ?x (~fl/ ?y ?rest ...) ) ) ) )
     538      ($fp/ ?x (*fl/ ?y ?rest ...) ) ) ) )
    539539
    540540) ;module err5rs-arithmetic-flonums
Note: See TracChangeset for help on using the changeset viewer.