Changeset 7391
 Timestamp:
 Oct 12, 2007, 9:23:29 AM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/working0710/ccl/level0/l0bignum64.lisp
r5837 r7391 2068 2068 2069 2069 2070 (defun %bignumrandom (number state) 2071 (let* ((ndigits (%bignumlength number)) 2072 (signindex (1 ndigits))) 2073 (declare (fixnum ndigits signindex)) 2074 (withbignumbuffers ((bignum ndigits)) 2075 (dotimes (i signindex) 2076 (setf (bignumref bignum i) (%nextrandomseed state))) 2077 (setf (bignumref bignum signindex) 2078 (logand #x7fffffff (the (unsignedbyte 32) 2079 (%nextrandomseed state)))) 2080 (let* ((result (mod bignum number))) 2081 (if (eq result bignum) 2082 (copyuvector bignum) 2083 result))))) 2084 2085 2086 2070 2087 (defun logbitp (index integer) 2071 2088 "Predicate returns T if bit index of integer is a 1."
Note: See TracChangeset
for help on using the changeset viewer.