]> gitweb.factorcode.org Git - factor.git/commitdiff
random: don't assume random-bytes is a byte-vector
authorJoe Groff <arcata@gmail.com>
Wed, 16 Nov 2011 18:03:00 +0000 (10:03 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 16 Nov 2011 18:03:42 +0000 (10:03 -0800)
It's not anymore.

basis/random/random.factor

index cba194b399cdca3f9d90b5e378b66c6e0bbd798d..2a1f90c0ff8df879c4b4e1e1028aaa189c19d78e 100644 (file)
@@ -96,8 +96,8 @@ ERROR: too-many-samples seq n ;
     secure-random-generator get swap with-random ; inline
 
 : uniform-random-float ( min max -- n )
-    4 random-bytes underlying>> uint deref >float
-    4 random-bytes underlying>> uint deref >float
+    4 random-bytes uint deref >float
+    4 random-bytes uint deref >float
     2.0 32 ^ * +
     [ over - 2.0 -64 ^ * ] dip
     * + ; inline