Changeset 37011 in project


Ignore:
Timestamp:
12/16/18 22:15:54 (5 weeks ago)
Author:
kon
Message:

deal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/amb/trunk/amb.scm

    r37009 r37011  
    164164
    165165(define (integer-length n)
    166   (do (
    167         (i 1 (add1 i))
    168         (n (arithmetic-shift n -1) (arithmetic-shift n -1)) )
    169       ((zero? n) i) ) )
     166  (if (negative? n)
     167    (add1 (integer-length (abs n)))
     168    (do (
     169          (i 1 (add1 i))
     170          (n (arithmetic-shift n -1) (arithmetic-shift n -1)) )
     171        ((zero? n) i) ) ) )
    170172
    171173(: vector-shuffle! ((vector-of *) #!optional (procedure (fixnum) fixnum) -> void))
Note: See TracChangeset for help on using the changeset viewer.