factor/extra/random/blum-blum-shub/blum-blum-shub-tests.factor

32 lines
808 B
Factor
Raw Normal View History

2008-04-07 20:28:54 -04:00
USING: kernel math tools.test namespaces random
2008-06-09 06:22:21 -04:00
random.blum-blum-shub alien.c-types sequences splitting
grouping ;
2008-04-07 20:28:54 -04:00
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
2008-04-07 20:28:54 -04:00
] unit-test
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
2008-04-07 20:28:54 -04:00
32 random-bits
little-endian? [ <uint> reverse *uint ] unless
2008-04-07 20:28:54 -04:00
] with-random
] unit-test
[ 5726770047455156646 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
2008-04-07 20:28:54 -04:00
64 random-bits
little-endian? [ <ulonglong> 4 group [ reverse ] map concat *ulonglong ] unless
2008-04-07 20:28:54 -04:00
] with-random
] unit-test
[ 3716213681 ]
[
100 T{ blum-blum-shub f 200352954495 846054538649 } clone tuck [
2008-04-07 20:28:54 -04:00
random-32* drop
] curry times
random-32*
] unit-test