line |
true |
false |
branch |
205
|
645684 |
4139 |
for (kk = N-M+1; --kk; n0 = n1, n1 = *sn++) { |
206
|
322117 |
323567 |
*st++ = *sx++ ^ TWIST(n0, n1); |
209
|
641545 |
4139 |
for (kk = M; --kk; n0 = n1, n1 = *sn++) { |
210
|
320790 |
320755 |
*st++ = *sx++ ^ TWIST(n0, n1); |
213
|
2118 |
2021 |
*st = *sx ^ TWIST(n0, n1); |
227
|
4 |
586 |
IRAND(x, prng); |
240
|
0 |
174 |
IRAND(x1, prng); |
241
|
0 |
174 |
IRAND(y1, prng); |
244
|
38 |
136 |
} while (x2*x2 + y2*y2 > 1.0); |
296
|
6036 |
3520 |
DUAL_PRNG |
|
6036 |
0 |
DUAL_PRNG |
|
0 |
9556 |
DUAL_PRNG |
297
|
43 |
9513 |
IRAND(RETVAL, prng); |
313
|
1030 |
1000 |
DUAL_PRNG |
|
1030 |
0 |
DUAL_PRNG |
|
0 |
2030 |
DUAL_PRNG |
316
|
7 |
2023 |
IRAND(rand, prng); |
318
|
30 |
2000 |
if (items) { |
320
|
29 |
1 |
RETVAL *= SvNV(ST(idx)); |
340
|
4 |
0 |
if (items && sv_isobject(ST(0))) { |
|
1 |
3 |
if (items && sv_isobject(ST(0))) { |
350
|
0 |
4 |
prng = GET_PRNG; |
353
|
2 |
2 |
if (items == 1 && SvROK(ST(idx)) && SvTYPE(SvRV(ST(idx)))==SVt_PVAV) { |
|
2 |
0 |
if (items == 1 && SvROK(ST(idx)) && SvTYPE(SvRV(ST(idx)))==SVt_PVAV) { |
|
2 |
0 |
if (items == 1 && SvROK(ST(idx)) && SvTYPE(SvRV(ST(idx)))==SVt_PVAV) { |
358
|
2 |
0 |
} else if (GIMME_V == G_ARRAY) { |
|
1 |
1 |
} else if (GIMME_V == G_ARRAY) { |
360
|
6 |
1 |
for (ii = items-1 ; ii > 0 ; ii--) { |
363
|
0 |
6 |
IRAND(rand, prng); |
376
|
7 |
1 |
while (items--) { |
383
|
18 |
3 |
for (ii=av_len(ary); ii > 0; ii--) { |
386
|
0 |
18 |
IRAND(rand, prng); |
411
|
1000000 |
0 |
DUAL_PRNG |
|
500000 |
500000 |
DUAL_PRNG |
|
0 |
1000000 |
DUAL_PRNG |
413
|
500000 |
500000 |
if (prng->gaussian.have) { |
422
|
4085 |
632997 |
IRAND(u1, prng); |
423
|
0 |
637082 |
IRAND(u2, prng); |
427
|
137082 |
500000 |
} while (r >= 1.0); |
437
|
1000000 |
0 |
if (items) { |
439
|
999998 |
2 |
RETVAL *= SvNV(ST(idx)); |
440
|
0 |
1000000 |
if (items > 1) { |
442
|
0 |
0 |
RETVAL += SvNV(ST(idx+1)); |
458
|
10 |
10 |
DUAL_PRNG |
|
10 |
0 |
DUAL_PRNG |
|
0 |
20 |
DUAL_PRNG |
462
|
10 |
10 |
if (items) { |
464
|
9 |
1 |
RETVAL *= SvNV(ST(idx)); |
482
|
40 |
0 |
DUAL_PRNG |
|
20 |
20 |
DUAL_PRNG |
|
0 |
40 |
DUAL_PRNG |
485
|
0 |
40 |
if (! items) { |
488
|
40 |
0 |
if ((order = SvIV(ST(idx))) < 1) { |
|
0 |
40 |
if ((order = SvIV(ST(idx))) < 1) { |
492
|
20 |
20 |
if (order < 6) { |
495
|
60 |
20 |
for (ii=0; ii < order; ii++) { |
509
|
4 |
32 |
} while (RETVAL <= 0.0); |
511
|
12 |
20 |
} while (_rand(prng) > bound); |
514
|
0 |
40 |
if (items > 1) { |
516
|
0 |
0 |
RETVAL *= SvNV(ST(idx+1)); |
533
|
40 |
0 |
DUAL_PRNG |
|
20 |
20 |
DUAL_PRNG |
|
0 |
40 |
DUAL_PRNG |
536
|
0 |
40 |
if (! items) { |
539
|
40 |
0 |
if (items == 1) { |
540
|
36 |
4 |
if ((mean = SvNV(ST(idx))) <= 0.0) { |
|
0 |
40 |
if ((mean = SvNV(ST(idx))) <= 0.0) { |
544
|
0 |
0 |
if ((mean = SvNV(ST(idx)) * SvNV(ST(idx+1))) < 1.0) { |
|
0 |
0 |
if ((mean = SvNV(ST(idx)) * SvNV(ST(idx+1))) < 1.0) { |
|
0 |
0 |
if ((mean = SvNV(ST(idx)) * SvNV(ST(idx+1))) < 1.0) { |
549
|
20 |
20 |
if (mean < 12.0) { |
555
|
20 |
49 |
if (bound < limit) { |
563
|
2 |
18 |
if (prng->poisson.mean != mean) { |
574
|
2 |
30 |
} while (em < 0.0); |
580
|
10 |
20 |
} while (_rand(prng) > bound); |
601
|
60 |
0 |
DUAL_PRNG |
|
30 |
30 |
DUAL_PRNG |
|
0 |
60 |
DUAL_PRNG |
604
|
0 |
60 |
if (items < 2) { |
607
|
60 |
0 |
if (((prob = SvNV(ST(idx))) < 0.0 || prob > 1.0) || |
|
60 |
0 |
if (((prob = SvNV(ST(idx))) < 0.0 || prob > 1.0) || |
|
60 |
0 |
if (((prob = SvNV(ST(idx))) < 0.0 || prob > 1.0) || |
|
0 |
60 |
if (((prob = SvNV(ST(idx))) < 0.0 || prob > 1.0) || |
608
|
60 |
0 |
((trials = SvIV(ST(idx+1))) < 0)) |
614
|
40 |
20 |
p = (prob <= 0.5) ? prob : 1.0-prob; |
616
|
20 |
40 |
if (trials < 25) { |
619
|
300 |
20 |
for (ii=1; ii <= trials; ii++) { |
620
|
141 |
159 |
if (_rand(prng) < p) { |
626
|
20 |
20 |
if ((mean = p * trials) < 1.0) { |
630
|
23 |
0 |
for (RETVAL=0; RETVAL < trials; RETVAL++) { |
632
|
20 |
3 |
if (bound < limit) { |
644
|
2 |
18 |
if (trials != prng->binomial.trials) { |
648
|
2 |
18 |
if (p != prng->binomial.prob) { |
658
|
11 |
57 |
} while (em < 0.0 || em >= (en+1.0)); |
|
1 |
56 |
} while (em < 0.0 || em >= (en+1.0)); |
666
|
36 |
20 |
} while (_rand(prng) > bound); |
672
|
20 |
40 |
if (p < prob) { |
719
|
0 |
34 |
if ((prng = GET_PRNG)) { |
|
34 |
0 |
if ((prng = GET_PRNG)) { |
741
|
0 |
32 |
prng = GET_PRNG; |
751
|
9952 |
32 |
for (ii=1; ii
|
757
|
9984 |
32 |
for (kk = ((N>len) ? N : len); kk; kk--) { |
759
|
2080 |
7904 |
+ SvUV(*av_fetch(myseed, jj, 0)) + jj; |
760
|
32 |
9952 |
if (++ii >= N) { st[0] = st[N-1]; ii=1; } |
761
|
1989 |
7995 |
if (++jj >= len) jj=0; |
765
|
9952 |
32 |
for (kk=N-1; kk; kk--) { |
767
|
32 |
9920 |
if (++ii >= N) { st[0] = st[N-1]; ii=1; } |
793
|
0 |
9 |
prng = GET_PRNG; |
800
|
2808 |
9 |
for (ii=0; ii
|
839
|
0 |
8 |
prng = GET_PRNG; |
845
|
0 |
8 |
if (av_len(state) != N+11) { |
850
|
2496 |
8 |
for (ii=0; ii
|
851
|
917 |
1579 |
prng->state[ii] = SvUV(*av_fetch(state, ii, 0)); |
853
|
8 |
0 |
prng->left = SvIV(*av_fetch(state, ii, 0)); ii++; |
854
|
4 |
4 |
if (prng->left > 1) { |
859
|
8 |
0 |
prng->gaussian.have = SvIV(*av_fetch(state, ii, 0)); ii++; |
860
|
6 |
2 |
prng->gaussian.value = SvNV(*av_fetch(state, ii, 0)); ii++; |
861
|
6 |
2 |
prng->poisson.mean = SvNV(*av_fetch(state, ii, 0)); ii++; |
862
|
6 |
2 |
prng->poisson.log_mean = SvNV(*av_fetch(state, ii, 0)); ii++; |
863
|
6 |
2 |
prng->poisson.sqrt2mean = SvNV(*av_fetch(state, ii, 0)); ii++; |
864
|
6 |
2 |
prng->poisson.term = SvNV(*av_fetch(state, ii, 0)); ii++; |
865
|
8 |
0 |
prng->binomial.trials = SvIV(*av_fetch(state, ii, 0)); ii++; |
866
|
6 |
2 |
prng->binomial.term = SvNV(*av_fetch(state, ii, 0)); ii++; |
867
|
6 |
2 |
prng->binomial.prob = SvNV(*av_fetch(state, ii, 0)); ii++; |
868
|
6 |
2 |
prng->binomial.plog = SvNV(*av_fetch(state, ii, 0)); ii++; |
869
|
6 |
2 |
prng->binomial.pclog = SvNV(*av_fetch(state, ii, 0)); |