diff --git a/src/code/rand-xoroshiro.lisp b/src/code/rand-xoroshiro.lisp index cfad7a3923d302a2cc1f94a212a872b29fdb42cf..67324ec5ad9f15c3fdc115922a9822c3ae40dfc8 100644 --- a/src/code/rand-xoroshiro.lisp +++ b/src/code/rand-xoroshiro.lisp @@ -474,8 +474,11 @@ (declare (inline %random-single-float %random-double-float)) (cond ((typep arg '(integer 1 #x100000000)) - ;; Let the compiler deftransform take care of this case. - (%random-integer arg state)) + ;; Do the same thing as the deftransform would do. + (if (= arg (expt 2 32)) + (random-chunk state) + (values (bignum::%multiply (random-chunk state) + arg)))) ((and (typep arg 'single-float) (> arg 0.0F0)) (%random-single-float arg state)) ((and (typep arg 'double-float) (> arg 0.0D0))