%\NeedsTeXFormat{LaTeX2e}
%\typeout{Option Style�eqbgraph�f2005 July 29 by T. Moonlight}
%\typeout{......................main style +qbgraph++++++++++}
\typeout{                       sub style         +qbgrapht+ random module}
%
% �[���������� ������
%
\newcount\tmprndN
\newcount\tmprndM
\newcount\tmprndS
\newcount\tmprndC
\newcount\tmprndCC
\newcount\tmprndCCC
\newcount\tmprndNe
\newcount\tmprndMe
\newcount\tmprndSe
\newcount\tmprndCe
\newcount\tmprndCCe
%\tmprndN=0\tmprndM=32768\tmprndS=237\tmprndC=1243 %2^15
\tmprndN=0\tmprndM=2048\tmprndS=77\tmprndC=751 %2^11
\tmprndNe=0\tmprndMe=31\tmprndSe=7\tmprndCe=6 %2^11
\newdimen\tmprndr
%
\newcommand{\qbrnd}{%
\global\multiply\tmprndCe by \tmprndSe%
\tmprndCCe=\tmprndCe%
\global\divide\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by -1%
\global\advance\tmprndCe by \tmprndCCe%
%
\global\multiply\tmprndC by \tmprndS%
  \global\advance\tmprndC by \tmprndCe%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\the\tmprndC%
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndx}[1]{%
\global\multiply\tmprndCe by \tmprndSe%
\tmprndCCe=\tmprndCe%
\global\divide\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by -1%
\global\advance\tmprndCe by \tmprndCCe%
%
\global\multiply\tmprndC by \tmprndS%
  \global\advance\tmprndC by \tmprndCe%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\qbdef{\tmprndC}{#1}%
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndseed}[1]{%
\tmprndN=0
\loop
\ifnum \tmprndN<#1 \qbrndx{\tmpdum} \repeat
}
\newcommand{\qbrndi}[1]{%
\global\multiply\tmprndCe by \tmprndSe%
\tmprndCCe=\tmprndCe%
\global\divide\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by -1%
\global\advance\tmprndCe by \tmprndCCe%
%
\global\multiply\tmprndC by \tmprndS%
  \global\advance\tmprndC by \tmprndCe%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\tmprndCC=\tmprndC
\tmprndCCC=\tmprndC
\global\divide\tmprndCC by #1
\global\multiply\tmprndCC by #1
\global\multiply\tmprndCC by -1
\global\advance\tmprndCCC by \tmprndCC
\the\tmprndCCC
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndii}[2]{%
\global\multiply\tmprndCe by \tmprndSe%
\tmprndCCe=\tmprndCe%
\global\divide\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by -1%
\global\advance\tmprndCe by \tmprndCCe%
%
\global\multiply\tmprndC by \tmprndS%
  \global\advance\tmprndC by \tmprndCe%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\tmprndCC=\tmprndC
\tmprndCCC=\tmprndC
\global\divide\tmprndCC by #1
\global\multiply\tmprndCC by #1
\global\multiply\tmprndCC by -1
\global\advance\tmprndCCC by \tmprndCC
\global\advance\tmprndCCC by #2
\the\tmprndCCC
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndiih}[2]{%
\global\multiply\tmprndCe by \tmprndSe%
\tmprndCCe=\tmprndCe%
\global\divide\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by \tmprndMe%
\global\multiply\tmprndCCe by -1%
\global\advance\tmprndCe by \tmprndCCe%
%
\global\multiply\tmprndC by \tmprndS%
  \global\advance\tmprndC by \tmprndCe%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\tmprndCC=\tmprndC
\tmprndCCC=\tmprndC
\global\divide\tmprndCC by #1
\global\multiply\tmprndCC by #1
\global\multiply\tmprndCC by -1
\global\advance\tmprndCCC by \tmprndCC
\global\advance\tmprndCCC by #2
%\the\tmprndCCC
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndix}[2]{%
\global\multiply\tmprndC by \tmprndS%
\tmprndCC=\tmprndC%
\global\divide\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by \tmprndM%
\global\multiply\tmprndCC by -1%
\global\advance\tmprndC by \tmprndCC%
\tmprndCC=\tmprndC
\tmprndCCC=\tmprndC
\global\divide\tmprndCC by #1
\global\multiply\tmprndCC by #1
\global\multiply\tmprndCC by -1
\global\advance\tmprndCCC by \tmprndCC
\qbdef{\tmprndCCC}{#2}
\global\advance\tmprndN by 1%
}
\newcommand{\qbrndr}{%
\qbrndx{\tmprndr}%\typeout{\tmprndr >>>>}
\Div{\tmprndr}{2048}{\tmprndr}
%\Div{\tmprndr}{32768}{\tmprndr}
%\Div{\tmprndr}{10}{\tmprndr}
\tmprndr%\typeout{\tmprndr}
}
\newcommand{\qbrndrpoint}[2]{%
\qbrndx{\tmprndr}%\typeout{\tmprndr >>>>}
\Div{\tmprndr}{2048}{#1}
\qbrndx{\tmprndr}%\typeout{\tmprndr >>>>}
\Div{\tmprndr}{2048}{#2}
}
\endinput
% �����܂ł��}�N���B�ȉ��ᕶ�B