Raymond Toy pushed to branch rtoy-xoro-default at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/rand-xoroshiro.lisp
    ... ... @@ -155,10 +155,12 @@
    155 155
     		     (double-float-bits x)
    
    156 156
     		   (logior (ash (ldb (byte 32 0) hi) 32)
    
    157 157
     			   lo))))
    
    158
    -	  (prin1 (make-array 2 :element-type '(unsigned-byte 64)
    
    158
    +	  (write (make-array 2 :element-type '(unsigned-byte 64)
    
    159 159
     			     :initial-contents (list (c (aref state 0))
    
    160 160
     						     (c (aref state 1))))
    
    161
    -		 stream)))
    
    161
    +		 :stream stream
    
    162
    +		 :base 16
    
    163
    +		 :radix t)))
    
    162 164
           (write-char #\space stream)
    
    163 165
           (pprint-newline :linear stream)
    
    164 166
     
    
    ... ... @@ -387,6 +389,9 @@
    387 389
     (defun %random-double-float (arg state)
    
    388 390
       (declare (type (double-float (0d0)) arg)
    
    389 391
     	   (type random-state state))
    
    392
    +  ;; xoroshiro-gen produces 64-bit values.  Should we use that
    
    393
    +  ;; directly to get the random bits instead of two calls to
    
    394
    +  ;; RANDOM-CHUNK?
    
    390 395
       (* arg
    
    391 396
          (- (lisp::make-double-float
    
    392 397
     	 (dpb (ash (random-chunk state)