]> gitweb.factorcode.org Git - factor.git/commitdiff
remove dependency on contr-bmath
authorDoug Coleman <erg@trifocus.net>
Fri, 27 Jan 2006 19:31:50 +0000 (19:31 +0000)
committerDoug Coleman <erg@trifocus.net>
Fri, 27 Jan 2006 19:31:50 +0000 (19:31 +0000)
contrib/random-tester/load.factor
contrib/random-tester/random-tester.factor
contrib/random-tester/random.factor
contrib/random-tester/utils.factor

index 38cc47b0dbdbb3adeb7ac0b8342eec987cd331e4..06583c7cb6392e6bbb079577a9fcbb32c6af85a5 100644 (file)
@@ -1,8 +1,6 @@
 USING: kernel parser sequences words compiler ;
 IN: scratchpad
 
-"contrib/math/utils.factor" run-resource
-
 {
     "utils"
     "random"
index 456636ac36d201d43d6b04ca5543fa374dd53dfc..e13a17840ded2c75dde8f3df357b7cba8ba0d36c 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io math-contrib ;
+       compiler syntax lists io ;
 USING: inspector prettyprint ;
 USING: optimizer compiler-frontend compiler-backend inference ;
 IN: random-tester
@@ -67,10 +67,10 @@ IN: random-tester
 : float>x ( float -- x )
     {
         1+ 1- >bignum >digit >fixnum abs absq arg 
-        cis conjugate cos cosec cosech
-        cosh cot coth double>bits exp float>bits imaginary
+        ceiling cis conjugate cos cosec cosech
+        cosh cot coth double>bits exp float>bits floor imaginary
         log neg next-power-of-2 quadrant real sec
-        sech sgn sin sinh sq sqrt tan tanh 
+        sech sgn sin sinh sq sqrt tan tanh truncate
     } ;
 
 : complex>x
index 4abd1a0d46e39c9685c45a2b9cae6bb5f285dd8c..6efda3152b026c3fe518d19227bdf819de342180 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io math-contrib ;
+       compiler syntax lists io ;
 USING: inspector prettyprint ;
 USING: optimizer compiler-frontend compiler-backend inference ;
 IN: random-tester
index f2fd0a0228a8b40d6940161a9e597dad5ef21926..84371a75f9716c07e1e1178c68b877590e49c6ab 100644 (file)
@@ -1,10 +1,12 @@
 USING: kernel math sequences namespaces errors hashtables words arrays parser
-       compiler syntax lists io math-contrib ;
+       compiler syntax lists io ;
 USING: optimizer compiler-frontend compiler-backend inference
        inspector prettyprint ;
 IN: random-tester
 
 
+: nth-rand ( seq -- elem ) [ length random-int ] keep nth ;
+
 ! HASHTABLES
 : random-hash-entry ( hash -- key value ) hash>alist nth-rand first2 ;