Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/rand-xoroshiro.lisp
    ... ... @@ -474,8 +474,11 @@
    474 474
       (declare (inline %random-single-float %random-double-float))
    
    475 475
       (cond
    
    476 476
         ((typep arg '(integer 1 #x100000000))
    
    477
    -     ;; Let the compiler deftransform take care of this case.
    
    478
    -     (%random-integer arg state))
    
    477
    +     ;; Do the same thing as the deftransform would do.
    
    478
    +     (if (= arg (expt 2 32))
    
    479
    +	 (random-chunk state)
    
    480
    +	 (values (bignum::%multiply (random-chunk state)
    
    481
    +				    arg))))
    
    479 482
         ((and (typep arg 'single-float) (> arg 0.0F0))
    
    480 483
          (%random-single-float arg state))
    
    481 484
         ((and (typep arg 'double-float) (> arg 0.0D0))