Changeset 8920


Ignore:
Timestamp:
Mar 28, 2008, 8:28:31 AM (11 years ago)
Author:
gb
Message:

Fix MAKE-RANDOM-STATE, which was broken a while ago. (64-bit platforms
don't split the 32-bit seed into two 16-bit words.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-numbers.lisp

    r7651 r8920  
    453453      (progn
    454454        (setq state (require-type (or state *random-state*) 'random-state))
    455         (setq seed-1 (random.seed-1 state) seed-2 (random.seed-2 state))))
     455        #+32-bit-target
     456        (setq seed-1 (random.seed-1 state) seed-2 (random.seed-2 state))
     457        #+64-bit-target
     458        (let* ((seed (random.seed-1 state)))
     459          (declare (type (unsigned-byte 32) seed))
     460          (setq seed-1 (ldb (byte 16 16) seed)
     461                seed-2 (ldb (byte 16 0) seed)))))
    456462    (%cons-random-state seed-1 seed-2)))
    457463
Note: See TracChangeset for help on using the changeset viewer.