remove dependency on contr-bmath
parent
01d9faa5fa
commit
133793ced1
|
@ -1,8 +1,6 @@
|
|||
USING: kernel parser sequences words compiler ;
|
||||
IN: scratchpad
|
||||
|
||||
"contrib/math/utils.factor" run-resource
|
||||
|
||||
{
|
||||
"utils"
|
||||
"random"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue