Skip to content

Commit

Permalink
random: Bump up the random unit tests from 50k to 500k. At 50k, paret…
Browse files Browse the repository at this point in the history
…o doesn't have enough samples to get the right std. At 500k, it should never fail again..
  • Loading branch information
erg committed Aug 16, 2012
1 parent aad7016 commit afb2a6e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions basis/random/random-tests.factor
Original file line number Diff line number Diff line change
Expand Up @@ -35,57 +35,57 @@ IN: random.tests
[ [ 100 random-bytes ] with-system-random drop ] unit-test

{ t t }
[ 50000 [ 0 1 normal-random-float ] replicate [ mean 0 .2 ~ ] [ std 1 .2 ~ ] bi ] unit-test
[ 500000 [ 0 1 normal-random-float ] replicate [ mean 0 .2 ~ ] [ std 1 .2 ~ ] bi ] unit-test

{ t }
[ 50000 [ .15 exponential-random-float ] replicate [ mean ] [ std ] bi .2 ~ ] unit-test
[ 500000 [ .15 exponential-random-float ] replicate [ mean ] [ std ] bi .2 ~ ] unit-test

{ t }
[ 50000 [ 1 exponential-random-float ] replicate [ mean ] [ std ] bi .2 ~ ] unit-test
[ 500000 [ 1 exponential-random-float ] replicate [ mean ] [ std ] bi .2 ~ ] unit-test

{ t t }
[
50000 [ 1 3 pareto-random-float ] replicate [ mean ] [ std ] bi
500000 [ 1 3 pareto-random-float ] replicate [ mean ] [ std ] bi
[ 1.5 .5 ~ ] [ 3 sqrt 2 / .5 ~ ] bi*
] unit-test

{ t t }
[
50000 [ 2 3 gamma-random-float ] replicate
500000 [ 2 3 gamma-random-float ] replicate
[ mean 6 .2 ~ ] [ std 2 sqrt 3 * .2 ~ ] bi
] unit-test

{ t t }
[
50000 [ 2 3 beta-random-float ] replicate
500000 [ 2 3 beta-random-float ] replicate
[ mean 2 2 3 + / .2 ~ ]
[ std 2 sqrt 3 sqrt + 2 3 + dup 1 + sqrt * / .2 ~ ] bi
] unit-test

{ t }
[ 50000 [ 3 4 von-mises-random-float ] replicate mean 3 .2 ~ ] unit-test
[ 500000 [ 3 4 von-mises-random-float ] replicate mean 3 .2 ~ ] unit-test

{ t t }
[
50000 [ 2 7 triangular-random-float ] replicate
500000 [ 2 7 triangular-random-float ] replicate
[ mean 2 7 + 2 / .2 ~ ] [ std 7 2 - 2 6 sqrt * / .2 ~ ] bi
] unit-test

{ t t }
[
50000 [ 2 3 laplace-random-float ] replicate
500000 [ 2 3 laplace-random-float ] replicate
[ mean 2 .2 ~ ] [ std 2 sqrt 3 * .2 ~ ] bi
] unit-test

{ t t }
[
50000 [ 12 rayleigh-random-float ] replicate
500000 [ 12 rayleigh-random-float ] replicate
[ mean pi 2 / sqrt 12 * .2 ~ ]
[ std 2 pi 2 / - sqrt 12 * .2 ~ ] bi
] unit-test

{ t t }
[
50000 [ 3 4 logistic-random-float ] replicate
500000 [ 3 4 logistic-random-float ] replicate
[ mean 3 .2 ~ ] [ std pi 4 * 3 sqrt / .2 ~ ] bi
] unit-test

0 comments on commit afb2a6e

Please sign in to comment.