]> gitweb.factorcode.org Git - factor.git/commitdiff
moved nth-rand to contrib/math/utils
authorDoug Coleman <erg@trifocus.net>
Mon, 23 Jan 2006 23:59:33 +0000 (23:59 +0000)
committerDoug Coleman <erg@trifocus.net>
Mon, 23 Jan 2006 23:59:33 +0000 (23:59 +0000)
contrib/random-tester/load.factor
contrib/random-tester/random-tester.factor
contrib/random-tester/random.factor
contrib/random-tester/utils.factor

index 06583c7cb6392e6bbb079577a9fcbb32c6af85a5..38cc47b0dbdbb3adeb7ac0b8342eec987cd331e4 100644 (file)
@@ -1,6 +1,8 @@
 USING: kernel parser sequences words compiler ;
 IN: scratchpad
 
+"contrib/math/utils.factor" run-resource
+
 {
     "utils"
     "random"
index 8ff7a01a71a94bf232b3b621ad7063e09169baae..b31cdc9acef828902ee8d96e485224e6c90235d1 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io ;
+       compiler syntax lists io math-contrib ;
 USING: inspector prettyprint ;
 USING: optimizer compiler-frontend compiler-backend inference ;
 IN: random-tester
index 917dd3db5ccd5fbbf9cab6cd49e1e58fa4155c81..7c7ec4e0ad89675712edd8e1294a51fb5c07ddb5 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io ;
+       compiler syntax lists io math-contrib ;
 USING: inspector prettyprint ;
 USING: optimizer compiler-frontend compiler-backend inference ;
 IN: random-tester
@@ -29,7 +29,6 @@ IN: random-tester
 : random-string
     [ max-length random-int [ max-value random-int , ] times ] "" make ;
 
-
 SYMBOL: special-integers
 [ { -1 0 1 } % most-negative-fixnum , most-positive-fixnum , first-bignum , ] 
 { } make \ special-integers set
@@ -41,11 +40,11 @@ SYMBOL: special-floats
 SYMBOL: special-complexes
 [ 
     { -1 0 1 i -i } %
-    e , pi , 0 pi rect> , 0 pi neg rect> , pi neg 0 rect> , pi pi rect> ,
+    e , e neg , pi , pi neg ,
+    0 pi rect> , 0 pi neg rect> , pi neg 0 rect> , pi pi rect> ,
     pi pi neg rect> , pi neg pi rect> , pi neg pi neg rect> ,
     e neg e neg rect> , e e rect> ,
 ] { } make \ special-complexes set
-
 : special-complexes ( -- seq ) \ special-complexes get ;
 
 : random-fixnum ( -- fixnum )
index 81648eba4c18d423573d17dd7161abc26a8668e1..f2fd0a0228a8b40d6940161a9e597dad5ef21926 100644 (file)
@@ -1,11 +1,9 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io ;
+       compiler syntax lists io math-contrib ;
 USING: optimizer compiler-frontend compiler-backend inference
        inspector prettyprint ;
 IN: random-tester
 
-! SEQUENCES
-: nth-rand ( seq -- elem ) [ length random-int ] keep nth ;
 
 ! HASHTABLES
 : random-hash-entry ( hash -- key value ) hash>alist nth-rand first2 ;