Go to the source code of this file.
◆ ranlxd()
void ranlxd |
( |
double |
r[], |
|
|
int |
n |
|
) |
| |
◆ rlxd_get()
void rlxd_get |
( |
int |
state[] | ) |
|
◆ rlxd_init()
void rlxd_init |
( |
int |
level, |
|
|
int |
seed |
|
) |
| |
Definition at line 503 of file BesEvtGen/BesEvtGen-00-04-26/src/phokhara/PHOKHARA/ranlxd.c.
504{
505 int i,k,l;
506 int ibit,jbit,xbit[31];
508
509 if ((INT_MAX<2147483647)||(FLT_RADIX!=2)||(FLT_MANT_DIG<24)||
510 (DBL_MANT_DIG<48))
512
513 define_constants();
514
515 if (level==1)
516 pr=202;
517 else if (level==2)
518 pr=397;
519 else
521
522 i=seed;
523
524 for (k=0;k<31;k++)
525 {
526 xbit[k]=i%2;
527 i/=2;
528 }
529
530 if ((seed<=0)||(i!=0))
532
533 ibit=0;
534 jbit=18;
535
536 for (i=0;i<4;i++)
537 {
538 for (k=0;k<24;k++)
539 {
541
542 for (l=0;l<24;l++)
543 {
544 iy=xbit[ibit];
546
547 xbit[ibit]=(xbit[ibit]+xbit[jbit])%2;
548 ibit=(ibit+1)%31;
549 jbit=(jbit+1)%31;
550 }
551
552 if ((k%4)!=i)
554
556 }
557 }
558
563
564 ir=0;
565 jr=7;
566 is=91;
567 is_old=0;
568 prm=pr%12;
569 init=1;
570}
◆ rlxd_reset()
void rlxd_reset |
( |
int |
state[] | ) |
|
Definition at line 629 of file BesEvtGen/BesEvtGen-00-04-26/src/phokhara/PHOKHARA/ranlxd.c.
630{
631 int k;
632
633 if ((INT_MAX<2147483647)||(FLT_RADIX!=2)||(FLT_MANT_DIG<24)||
634 (DBL_MANT_DIG<48))
636
637 define_constants();
638
641
642 for (k=0;k<96;k++)
643 {
644 if ((state[k+1]<0)||(state[k+1]>=167777216))
646
647 x.num[k]=state[k+1];
648 }
649
650 if (((state[97]!=0)&&(state[97]!=1))||
651 ((state[98]!=0)&&(state[98]!=1))||
652 ((state[99]!=0)&&(state[99]!=1))||
653 ((state[100]!=0)&&(state[100]!=1)))
655
660
661 pr=state[101];
662 ir=state[102];
663 jr=state[103];
664 is=state[104];
665 is_old=8*ir;
666 prm=pr%12;
667 init=1;
668
669 if (((pr!=202)&&(pr!=397))||
670 (ir<0)||(ir>11)||(jr<0)||(jr>11)||(jr!=((ir+7)%12))||
671 (is<0)||(is>91))
673}
◆ rlxd_size()