remove dependency on contr-bmath
parent
01d9faa5fa
commit
133793ced1
|
@ -1,8 +1,6 @@
|
||||||
USING: kernel parser sequences words compiler ;
|
USING: kernel parser sequences words compiler ;
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
|
|
||||||
"contrib/math/utils.factor" run-resource
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"utils"
|
"utils"
|
||||||
"random"
|
"random"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: kernel math sequences namespaces errors hashtables words arrays parser
|
USING: kernel math sequences namespaces errors hashtables words arrays parser
|
||||||
compiler syntax lists io math-contrib ;
|
compiler syntax lists io ;
|
||||||
USING: inspector prettyprint ;
|
USING: inspector prettyprint ;
|
||||||
USING: optimizer compiler-frontend compiler-backend inference ;
|
USING: optimizer compiler-frontend compiler-backend inference ;
|
||||||
IN: random-tester
|
IN: random-tester
|
||||||
|
@ -67,10 +67,10 @@ IN: random-tester
|
||||||
: float>x ( float -- x )
|
: float>x ( float -- x )
|
||||||
{
|
{
|
||||||
1+ 1- >bignum >digit >fixnum abs absq arg
|
1+ 1- >bignum >digit >fixnum abs absq arg
|
||||||
cis conjugate cos cosec cosech
|
ceiling cis conjugate cos cosec cosech
|
||||||
cosh cot coth double>bits exp float>bits imaginary
|
cosh cot coth double>bits exp float>bits floor imaginary
|
||||||
log neg next-power-of-2 quadrant real sec
|
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
|
: complex>x
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: kernel math sequences namespaces errors hashtables words arrays parser
|
USING: kernel math sequences namespaces errors hashtables words arrays parser
|
||||||
compiler syntax lists io math-contrib ;
|
compiler syntax lists io ;
|
||||||
USING: inspector prettyprint ;
|
USING: inspector prettyprint ;
|
||||||
USING: optimizer compiler-frontend compiler-backend inference ;
|
USING: optimizer compiler-frontend compiler-backend inference ;
|
||||||
IN: random-tester
|
IN: random-tester
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
USING: kernel math sequences namespaces errors hashtables words arrays parser
|
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
|
USING: optimizer compiler-frontend compiler-backend inference
|
||||||
inspector prettyprint ;
|
inspector prettyprint ;
|
||||||
IN: random-tester
|
IN: random-tester
|
||||||
|
|
||||||
|
|
||||||
|
: nth-rand ( seq -- elem ) [ length random-int ] keep nth ;
|
||||||
|
|
||||||
! HASHTABLES
|
! HASHTABLES
|
||||||
: random-hash-entry ( hash -- key value ) hash>alist nth-rand first2 ;
|
: random-hash-entry ( hash -- key value ) hash>alist nth-rand first2 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue