summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xlop
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-16 23:58:18 +0000
committerKarl Berry <karl@freefriends.org>2010-12-16 23:58:18 +0000
commitd4578705f135c332f8be53e89baf508a8bd4e13e (patch)
tree8851426aee39718e45a9d554a460a755d28c2421 /Master/texmf-dist/tex/generic/xlop
parentf565a84e02adcdb964437eb46e1f5c3a6554ddc2 (diff)
xlop 0.23 (17dec10)
git-svn-id: svn://tug.org/texlive/trunk@20769 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xlop')
-rw-r--r--Master/texmf-dist/tex/generic/xlop/xlop.sty2
-rw-r--r--Master/texmf-dist/tex/generic/xlop/xlop.tex1896
2 files changed, 993 insertions, 905 deletions
diff --git a/Master/texmf-dist/tex/generic/xlop/xlop.sty b/Master/texmf-dist/tex/generic/xlop/xlop.sty
index 8c672c8d15e..65de248f1f0 100644
--- a/Master/texmf-dist/tex/generic/xlop/xlop.sty
+++ b/Master/texmf-dist/tex/generic/xlop/xlop.sty
@@ -1,3 +1,3 @@
-\ProvidesPackage{xlop}[2006/01/04 package wrapper for xlop.tex]
+\ProvidesPackage{xlop}[2009/12/02 package wrapper for xlop.tex]
\input xlop.tex
\endinput
diff --git a/Master/texmf-dist/tex/generic/xlop/xlop.tex b/Master/texmf-dist/tex/generic/xlop/xlop.tex
index dea98da45d0..004adf7c8f1 100644
--- a/Master/texmf-dist/tex/generic/xlop/xlop.tex
+++ b/Master/texmf-dist/tex/generic/xlop/xlop.tex
@@ -1,5 +1,5 @@
-\def\fileversion{0.22}
-\def\filedate{2006/01/04}
+\def\fileversion{0.23}
+\def\filedate{2009/12/02}
%%
%% xlop.tex:
%% eXtra Large OPeration macros for Generic TeX.
@@ -21,12 +21,13 @@
\let\xlopLoaded\endinput
\edef\opAtCode{\the\catcode`\@}
\catcode`\@=11\relax
-\newcount\count@z
-\newcount\count@i
-\newcount\count@ii
-\newcount\count@iii
-\newcount\count@iv
-\newcount\count@v
+\newcount\op@count@z
+\newcount\op@count@i
+\newcount\op@count@ii
+\newcount\op@count@iii
+\newcount\op@count@iv
+\newcount\op@count@v
+\newcount\op@count@vi
\newtoks\op@currentstyle
\expandafter\ifx\csname @latexerr\endcsname\relax
\long\def\@ifundefined#1#2#3{%
@@ -97,17 +98,17 @@
#1^^J\@spaces See documentation for further information.^^J}%
\endgroup
}
-\let\@nil\relax
+\let\op@nil\relax
\def\opset#1{%
- \Pop@set#1,\@nil
+ \Pop@set#1,\op@nil
\ifop@error\op@errorwrite\fi
\ignorespaces
}
\def\Pop@set#1,{%
- \Pop@@set#1==\@nil
- \@ifnextchar\@nil{\@gobble}{\Pop@set}%
+ \Pop@@set#1==\op@nil
+ \@ifnextchar\op@nil{\@gobble}{\Pop@set}%
}
-\def\Pop@@set#1=#2=#3\@nil{%
+\def\Pop@@set#1=#2=#3\op@nil{%
\@ifundefined{pOP@#1}%
{\Pop@@@set#1.={#2}}
{\@nameuse{pOP@#1}{#2}}%
@@ -469,19 +470,19 @@
\opset{carrystyle=\scriptsize}
\fi
-\count@z=`\0 \edef\op@numbegin{\the\count@z}
-\count@z=`\9 \edef\op@numend{\the\count@z}
-\count@z=`\+ \edef\op@plus{\the\count@z}
-\count@z=`\- \edef\op@minus{\the\count@z}
-\count@z=`\* \edef\op@multiply{\the\count@z}
-\count@z=`\/ \edef\op@divide{\the\count@z}
-\count@z=`\: \edef\op@idivide{\the\count@z}
-\count@z=`\^ \edef\op@pow{\the\count@z}
-\count@z=`\. \edef\op@dot{\the\count@z}
-\count@z=`\, \edef\op@comma{\the\count@z}
-\count@z=`\( \edef\op@lparenthesis{\the\count@z}
-\count@z=`\) \edef\op@rparenthesis{\the\count@z}
-\count@z=`\ \edef\op@space{\the\count@z}
+\op@count@z=`\0 \edef\op@numbegin{\the\op@count@z}
+\op@count@z=`\9 \edef\op@numend{\the\op@count@z}
+\op@count@z=`\+ \edef\op@plus{\the\op@count@z}
+\op@count@z=`\- \edef\op@minus{\the\op@count@z}
+\op@count@z=`\* \edef\op@multiply{\the\op@count@z}
+\op@count@z=`\/ \edef\op@divide{\the\op@count@z}
+\op@count@z=`\: \edef\op@idivide{\the\op@count@z}
+\op@count@z=`\^ \edef\op@pow{\the\op@count@z}
+\op@count@z=`\. \edef\op@dot{\the\op@count@z}
+\op@count@z=`\, \edef\op@comma{\the\op@count@z}
+\op@count@z=`\( \edef\op@lparenthesis{\the\op@count@z}
+\op@count@z=`\) \edef\op@rparenthesis{\the\op@count@z}
+\op@count@z=`\ \edef\op@space{\the\op@count@z}
\newcount\op@parenthesis
\newcount\op@token
\newcount\op@stack
@@ -518,17 +519,17 @@
\op@isplusfalse
\op@isminusfalse
\op@isdecimalsepfalse
- \count@z=`#1\relax
- \ifnum\count@z=\op@plus\relax
+ \op@count@z=`#1\relax
+ \ifnum\op@count@z=\op@plus\relax
\op@isplustrue
- \else\ifnum\count@z=\op@minus\relax
+ \else\ifnum\op@count@z=\op@minus\relax
\op@isminustrue
- \else\ifnum\count@z=\op@dot\relax
+ \else\ifnum\op@count@z=\op@dot\relax
\op@isdecimalseptrue
- \else\ifnum\count@z=\op@comma\relax
+ \else\ifnum\op@count@z=\op@comma\relax
\op@isdecimalseptrue
- \else\ifnum\count@z<\op@numbegin\relax
- \else\ifnum\count@z>\op@numend\relax
+ \else\ifnum\op@count@z<\op@numbegin\relax
+ \else\ifnum\op@count@z>\op@numend\relax
\else
\op@isdigittrue
\fi\fi\fi\fi\fi\fi
@@ -536,7 +537,7 @@
\def\op@split#1#2{%
\begingroup
\edef\op@arg{#1}%
- \expandafter\op@readnumber\op@arg\@nil
+ \expandafter\op@readnumber\op@arg\op@nil
\ifop@error
\op@error{Number name `#1' is undefined}%
{See documentation about number name}%
@@ -545,30 +546,30 @@
\else
\edef\op@name{#2}%
\op@length
- \count@i=\@nameuse{OP@\op@name @w}\relax
+ \op@count@i=\@nameuse{OP@\op@name @w}\relax
\edef\op@arg{\op@arg.}%
\let\next\op@@split
\fi
- \expandafter\next\op@arg\@nil
+ \expandafter\next\op@arg\op@nil
\endgroup
}
-\def\op@@split#1#2\@nil{%
- \ifnum\count@i>0
+\def\op@@split#1#2\op@nil{%
+ \ifnum\op@count@i>0
\edef\op@argi{#1}%
\edef\op@argii{#2}%
\let\next\op@@split
\expandafter\op@testchar\op@argi
\ifop@isdigit
- \@namexdef{OP@\op@name @\the\count@i}{\op@argi}%
- \advance\count@i by -1
+ \@namexdef{OP@\op@name @\the\op@count@i}{\op@argi}%
+ \advance\op@count@i by -1
\fi
\else
\let\next\relax
\let\op@argii\relax
\fi
- \expandafter\next\op@argii\@nil
+ \expandafter\next\op@argii\op@nil
}
-\def\op@readnumber#1#2\@nil{%
+\def\op@readnumber#1#2\op@nil{%
\op@testchar{#1}%
\ifop@isdigit \else
\ifop@isplus \else
@@ -581,25 +582,25 @@
}
\def\op@length{%
\begingroup
- \expandafter\op@@length\op@arg\@nil
- \ifnum\count@i=0
- \count@i=1
+ \expandafter\op@@length\op@arg\op@nil
+ \ifnum\op@count@i=0
+ \op@count@i=1
\xdef\op@arg{0\op@arg}%
\fi
- \@namexdef{OP@\op@name @i}{\the\count@i}%
- \@namexdef{OP@\op@name @d}{\the\count@ii}%
- \advance\count@i by \count@ii
- \@namexdef{OP@\op@name @w}{\the\count@i}%
+ \@namexdef{OP@\op@name @i}{\the\op@count@i}%
+ \@namexdef{OP@\op@name @d}{\the\op@count@ii}%
+ \advance\op@count@i by \op@count@ii
+ \@namexdef{OP@\op@name @w}{\the\op@count@i}%
\endgroup
}
-\def\op@@length#1#2\@nil{%
+\def\op@@length#1#2\op@nil{%
\edef\op@argi{#1}%
\edef\op@argii{#2}%
\expandafter\op@testchar\op@argi
\ifop@isdigit
\@namexdef{OP@\op@name @s}{0}%
- \count@i=1
- \count@ii=0
+ \op@count@i=1
+ \op@count@ii=0
\ifx\empty\op@argii
\let\next\relax
\let\op@argii\relax
@@ -614,8 +615,8 @@
\let\next\op@length@after@sign
\else \ifop@isdecimalsep
\@namexdef{OP@\op@name @s}{0}%
- \count@i=0
- \count@ii=0
+ \op@count@i=0
+ \op@count@ii=0
\let\next\op@length@after@decimalsep
\else
\op@error{\op@argi\op@argii\space isn't a valid number}%
@@ -629,14 +630,14 @@
\let\next\relax
\let\op@argii\relax
\fi
- \expandafter\next\op@argii\@nil
+ \expandafter\next\op@argii\op@nil
}
-\def\op@length@after@digit#1#2\@nil{%
+\def\op@length@after@digit#1#2\op@nil{%
\edef\op@argi{#1}%
\edef\op@argii{#2}%
\expandafter\op@testchar\op@argi
\ifop@isdigit
- \advance\count@i by 1
+ \advance\op@count@i by 1
\let\next\op@length@after@digit
\else \ifop@isdecimalsep
\let\next\op@length@after@decimalsep
@@ -650,9 +651,9 @@
\ifx\empty\op@argii
\let\next\relax
\fi
- \expandafter\next\op@argii\@nil
+ \expandafter\next\op@argii\op@nil
}
-\def\op@length@after@sign#1#2\@nil{%
+\def\op@length@after@sign#1#2\op@nil{%
\edef\op@argi{#1}%
\edef\op@argii{#2}%
\expandafter\op@testchar\op@argi
@@ -671,27 +672,27 @@
{See documentation for syntax of valid number}%
\let\next\relax
\else
- \count@i=0
- \count@ii=0
+ \op@count@i=0
+ \op@count@ii=0
\let\next\op@length@after@decimalsep
\fi
\else \ifop@isdigit
- \count@i=1
- \count@ii=0
+ \op@count@i=1
+ \op@count@ii=0
\ifx\empty\op@argii
\let\next\relax
\else
\let\next\op@length@after@digit
\fi
\fi\fi\fi\fi
- \expandafter\next\op@argii\@nil
+ \expandafter\next\op@argii\op@nil
}
-\def\op@length@after@decimalsep#1#2\@nil{%
+\def\op@length@after@decimalsep#1#2\op@nil{%
\edef\op@argi{#1}%
\edef\op@argii{#2}%
\expandafter\op@testchar\op@argi
\ifop@isdigit
- \advance\count@ii by 1
+ \advance\op@count@ii by 1
\let\next\op@length@after@decimalsep
\else
\op@error{#1#2 not allowed here. \space I forget it}%
@@ -704,7 +705,7 @@
\let\next\relax
\let\op@argii\relax
\fi
- \expandafter\next\op@argii\@nil
+ \expandafter\next\op@argii\op@nil
}
\def\op@unsplit#1#2{%
\begingroup
@@ -714,22 +715,22 @@
\else
\def\op@macroname{}%
\fi
- \count@z=\@nameuse{OP@\op@name @i}\relax
- \count@i=\@nameuse{OP@\op@name @w}\relax
+ \op@count@z=\@nameuse{OP@\op@name @i}\relax
+ \op@count@i=\@nameuse{OP@\op@name @w}\relax
\loop
- \ifnum\count@z>0
+ \ifnum\op@count@z>0
\edef\op@macroname{\op@macroname
- \@nameuse{OP@\op@name @\the\count@i}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ \@nameuse{OP@\op@name @\the\op@count@i}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
- \ifnum\count@i>0
+ \ifnum\op@count@i>0
\edef\op@macroname{\op@macroname\op@decimalsepsymbol}%
\loop
- \ifnum\count@i>0
+ \ifnum\op@count@i>0
\edef\op@macroname{\op@macroname
- \@nameuse{OP@\op@name @\the\count@i}}%
- \advance\count@i by-1
+ \@nameuse{OP@\op@name @\the\op@count@i}}%
+ \advance\op@count@i by-1
\repeat
\fi
\@namexdef{Op@#2}{\op@macroname}%
@@ -762,55 +763,55 @@
\begingroup
\edef\op@name{#4}%
\dimen0=\opcolumnwidth
- \count@z=#1%
- \advance\count@z by-\@nameuse{OP@\op@name @i}\relax
- \multiply\dimen0 by\count@z
+ \op@count@z=#1%
+ \advance\op@count@z by-\@nameuse{OP@\op@name @i}\relax
+ \multiply\dimen0 by\op@count@z
\global\setbox0=\hbox{%
\op@strut\vrule width\dimen0 height\z@ depth\z@}%
- \count@z=\@nameuse{OP@\op@name @i}\relax
- \count@i=\@nameuse{OP@\op@name @w}\relax
+ \op@count@z=\@nameuse{OP@\op@name @i}\relax
+ \op@count@i=\@nameuse{OP@\op@name @w}\relax
\loop
- \ifnum\count@z>0
- \op@setstyle{#3.\the\count@z}%
+ \ifnum\op@count@z>0
+ \op@setstyle{#3.\the\op@count@z}%
\global\setbox0=\hbox{\box0
\hbox to\opcolumnwidth{\hss\the\op@currentstyle
- {\@nameuse{OP@\op@name @\the\count@i}}\hss}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ {\@nameuse{OP@\op@name @\the\op@count@i}}\hss}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
- \ifnum\count@i>0
+ \ifnum\op@count@i>0
\op@setstyle{#3.d}%
\global\setbox0=\hbox{\box0
\hbox to\op@decimalsepwidth{\hss
\vrule width\op@decimalsepoffset height\z@ depth\z@
\the\op@currentstyle\op@decimalsepsymbol \hss}}%
- \count@z=-1
+ \op@count@z=-1
\loop
- \ifnum\count@i>0
- \op@setstyle{#3.\the\count@z}%
+ \ifnum\op@count@i>0
+ \op@setstyle{#3.\the\op@count@z}%
\global\setbox0=\hbox{\box0
\hbox to\opcolumnwidth{\hss\the\op@currentstyle
- {\@nameuse{OP@\op@name @\the\count@i}}\hss}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ {\@nameuse{OP@\op@name @\the\op@count@i}}\hss}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
\fi
\dimen0=\opcolumnwidth
- \count@z=#2\relax
- \advance\count@z by-\@nameuse{OP@\op@name @d}\relax
- \multiply\dimen0 by\count@z
+ \op@count@z=#2\relax
+ \advance\op@count@z by-\@nameuse{OP@\op@name @d}\relax
+ \multiply\dimen0 by\op@count@z
\global\setbox0=\hbox{\box0
\vrule width\dimen0 height\z@ depth\z@}%
\endgroup
}
\def\op@setstyle#1{%
\edef\op@arg{#1}%
- \expandafter\op@@setstyle\op@arg..\@nil
+ \expandafter\op@@setstyle\op@arg..\op@nil
}
-\def\op@@setstyle#1.#2.#3\@nil{%
+\def\op@@setstyle#1.#2.#3\op@nil{%
\edef\op@styleroot{#1}%
\edef\op@styleindex{#2}%
- \op@setstylesubindex#3.\@nil
+ \op@setstylesubindex#3.\op@nil
\ifx\empty\op@stylesubindex
\@ifundefined{op@\op@styleroot.\op@styleindex}%
{\op@currentstyle={\@nameuse{op@\op@styleroot.0}}}%
@@ -825,7 +826,7 @@
{\@nameuse{op@\op@styleroot.\op@styleindex.\op@stylesubindex}}}%
\fi
}
-\def\op@setstylesubindex#1.#2\@nil{\def\op@stylesubindex{#1}}
+\def\op@setstylesubindex#1.#2\op@nil{\def\op@stylesubindex{#1}}
\def\opdisplay{\@ifnextchar[{\op@displaypar}{\op@displaypar[nil]}}
\def\op@displaypar[#1]#2#3{%
\begingroup
@@ -853,46 +854,78 @@
}
\def\op@format#1#2#3{%
\begingroup
- \count@iii=#1\relax
- \count@iv=#2\relax
- \count@z=\count@iv
- \advance\count@z by-\@nameuse{OP@#3@d}\relax
- \ifnum\count@z>0
- \count@i=\@nameuse{OP@#3@w}\relax
- \advance\count@z by\count@i\relax
+ \op@count@iii=#1\relax
+ \op@count@iv=#2\relax
+ \op@count@z=\op@count@iv
+ \advance\op@count@z by-\@nameuse{OP@#3@d}\relax
+ \ifnum\op@count@z>0
+ \op@count@i=\@nameuse{OP@#3@w}\relax
+ \advance\op@count@z by\op@count@i\relax
\loop
- \@namexdef{OP@#3@\the\count@z}{\@nameuse{OP@#3@\the\count@i}}%
- \advance\count@i by-1
- \advance\count@z by-1\relax
- \ifnum\count@i>0
+ \@namexdef{OP@#3@\the\op@count@z}{\@nameuse{OP@#3@\the\op@count@i}}%
+ \advance\op@count@i by-1
+ \advance\op@count@z by-1\relax
+ \ifnum\op@count@i>0
\repeat
\loop
- \@namexdef{OP@#3@\the\count@z}{0}%
- \advance\count@z by-1\relax
- \ifnum\count@z>0
+ \@namexdef{OP@#3@\the\op@count@z}{0}%
+ \advance\op@count@z by-1\relax
+ \ifnum\op@count@z>0
\repeat
- \@namexdef{OP@#3@d}{\the\count@iv}%
- \count@i=\@nameuse{OP@#3@i}%
- \advance\count@i by\count@iv\relax
- \@namexdef{OP@#3@w}{\the\count@i}%
- \fi
- \count@z=\count@iii
- \advance\count@z by-\@nameuse{OP@#3@i}\relax
- \ifnum\count@z>0
- \count@i=\@nameuse{OP@#3@w}\relax
+ \@namexdef{OP@#3@d}{\the\op@count@iv}%
+ \op@count@i=\@nameuse{OP@#3@i}%
+ \advance\op@count@i by\op@count@iv\relax
+ \@namexdef{OP@#3@w}{\the\op@count@i}%
+ \fi
+ \op@count@z=\op@count@iii
+ \advance\op@count@z by-\@nameuse{OP@#3@i}\relax
+ \ifnum\op@count@z>0
+ \op@count@i=\@nameuse{OP@#3@w}\relax
\loop
- \advance\count@i by1
- \@namexdef{OP@#3@\the\count@i}{0}%
- \advance\count@z by-1\relax
- \ifnum\count@z>0
+ \advance\op@count@i by1
+ \@namexdef{OP@#3@\the\op@count@i}{0}%
+ \advance\op@count@z by-1\relax
+ \ifnum\op@count@z>0
\repeat
- \@namexdef{OP@#3@i}{\the\count@iii}%
+ \@namexdef{OP@#3@i}{\the\op@count@iii}%
\fi
- \count@i=\@nameuse{OP@#3@i}\relax
- \advance\count@i by\@nameuse{OP@#3@d}\relax
- \@namexdef{OP@#3@w}{\the\count@i}%
+ \op@count@i=\@nameuse{OP@#3@i}\relax
+ \advance\op@count@i by\@nameuse{OP@#3@d}\relax
+ \@namexdef{OP@#3@w}{\the\op@count@i}%
\endgroup
}
+% add 0.23
+\def\opexport{\@ifnextchar[{\op@export}{\op@export[nil]}}
+\def\op@export[#1]#2#3{%
+ \begingroup
+ \def\op@@export{}%
+ \opset{#1}%
+ \expandafter\def\expandafter\op@decimalsepsymbol\op@decimalsepsymbol
+ \op@split{#2}{tmp}%
+ \ifop@error
+ \op@errorwrite
+ \else
+ \op@count@vi=0
+ \loop
+ \ifnum\op@count@vi<\OP@tmp@d
+ \advance\op@count@vi by1
+ \xdef\op@@export{\@nameuse{OP@tmp@\the\op@count@vi}\op@@export}%
+ \repeat
+ \ifnum\OP@tmp@d>0
+ \xdef\op@@export{\op@decimalsepsymbol\op@@export}%
+ \op@count@i=0
+ \loop
+ \ifnum\op@count@i<\OP@tmp@i
+ \advance\op@count@vi by1
+ \advance\op@count@i by1
+ \xdef\op@@export{\@nameuse{OP@tmp@\the\op@count@vi}\op@@export}%
+ \repeat
+ \fi
+ \fi
+ \endgroup
+ \edef#3{\op@@export}%
+}
+% end add 0.23
\def\opunzero#1{%
\op@split{#1}{uzr}%
\ifop@error
@@ -904,47 +937,47 @@
}
\def\op@unzero#1{%
\begingroup
- \count@z=\@nameuse{OP@#1@i}\relax
- \count@i=\@nameuse{OP@#1@w}\relax
- \count@ii=\@nameuse{OP@#1@i}\relax
+ \op@count@z=\@nameuse{OP@#1@i}\relax
+ \op@count@i=\@nameuse{OP@#1@w}\relax
+ \op@count@ii=\@nameuse{OP@#1@i}\relax
\loop
- \ifnum\count@z>1\relax
- \ifnum\@nameuse{OP@#1@\the\count@i}=0\relax
- \advance\count@ii by-1
+ \ifnum\op@count@z>1\relax
+ \ifnum\@nameuse{OP@#1@\the\op@count@i}=0\relax
+ \advance\op@count@ii by-1
\else
- \count@z=0
+ \op@count@z=0
\fi
- \advance\count@z by-1
- \advance\count@i by-1
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
- \@namexdef{OP@#1@i}{\the\count@ii}%
- \count@z=\@nameuse{OP@#1@d}\relax
- \count@i=1\relax
- \count@ii=0\relax
+ \@namexdef{OP@#1@i}{\the\op@count@ii}%
+ \op@count@z=\@nameuse{OP@#1@d}\relax
+ \op@count@i=1\relax
+ \op@count@ii=0\relax
\loop
- \ifnum\count@z>0\relax
- \ifnum\@nameuse{OP@#1@\the\count@i}=0\relax
- \advance\count@ii by1
- \advance\count@z by-1
- \advance\count@i by1
+ \ifnum\op@count@z>0\relax
+ \ifnum\@nameuse{OP@#1@\the\op@count@i}=0\relax
+ \advance\op@count@ii by1
+ \advance\op@count@z by-1
+ \advance\op@count@i by1
\else
- \count@z=0
+ \op@count@z=0
\fi
\repeat
- \ifnum\count@ii>0\relax
- \count@z=1\relax
- \count@i=\@nameuse{OP@#1@w}\relax
- \count2=\count@ii
- \advance\count@ii by1
+ \ifnum\op@count@ii>0\relax
+ \op@count@z=1\relax
+ \op@count@i=\@nameuse{OP@#1@w}\relax
+ \count@=\op@count@ii
+ \advance\op@count@ii by1
\loop
- \@namexdef{OP@#1@\the\count@z}{\@nameuse{OP@#1@\the\count@ii}}%
- \ifnum\count@ii<\count@i
- \advance\count@z by1
- \advance\count@ii by1
+ \@namexdef{OP@#1@\the\op@count@z}{\@nameuse{OP@#1@\the\op@count@ii}}%
+ \ifnum\op@count@ii<\op@count@i
+ \advance\op@count@z by1
+ \advance\op@count@ii by1
\repeat
- \count@ii=\@nameuse{OP@#1@d}%
- \advance\count@ii by-\count2
- \@namexdef{OP@#1@d}{\the\count@ii}%
+ \op@count@ii=\@nameuse{OP@#1@d}%
+ \advance\op@count@ii by-\count@
+ \@namexdef{OP@#1@d}{\the\op@count@ii}%
\fi
\ifnum\@nameuse{OP@#1@i}=1\relax
\ifnum\@nameuse{OP@#1@d}=0\relax
@@ -953,9 +986,9 @@
\fi
\fi
\fi
- \count@i=\@nameuse{OP@#1@i}\relax
- \advance\count@i by\@nameuse{OP@#1@d}\relax
- \@namexdef{OP@#1@w}{\the\count@i}%
+ \op@count@i=\@nameuse{OP@#1@i}\relax
+ \advance\op@count@i by\@nameuse{OP@#1@d}\relax
+ \@namexdef{OP@#1@w}{\the\op@count@i}%
\endgroup
}
\def\opcopy#1#2{%
@@ -972,11 +1005,11 @@
\@namexdef{OP@#2@i}{\@nameuse{OP@#1@i}}%
\@namexdef{OP@#2@d}{\@nameuse{OP@#1@d}}%
\@namexdef{OP@#2@s}{\@nameuse{OP@#1@s}}%
- \count@z=\@nameuse{OP@#2@w}\relax
+ \op@count@z=\@nameuse{OP@#2@w}\relax
\loop
- \ifnum\count@z>0
- \@namexdef{OP@#2@\the\count@z}{\@nameuse{OP@#1@\the\count@z}}%
- \advance\count@z by-1
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#2@\the\op@count@z}{\@nameuse{OP@#1@\the\op@count@z}}%
+ \advance\op@count@z by-1
\repeat
\endgroup
}
@@ -1020,25 +1053,25 @@
\global\opneqtrue
\else
\op@againtrue
- \count@i=\OP@ca@w\relax
- \count@ii=\OP@cb@w\relax
+ \op@count@i=\OP@ca@w\relax
+ \op@count@ii=\OP@cb@w\relax
\loop
\ifop@again
- \ifnum\@nameuse{OP@ca@\the\count@i}>
- \@nameuse{OP@cb@\the\count@ii}\relax
+ \ifnum\@nameuse{OP@ca@\the\op@count@i}>
+ \@nameuse{OP@cb@\the\op@count@ii}\relax
\op@againfalse
\global\opgttrue
\global\opgetrue
\global\opneqtrue
- \else \ifnum\@nameuse{OP@ca@\the\count@i}<
- \@nameuse{OP@cb@\the\count@ii}\relax
+ \else \ifnum\@nameuse{OP@ca@\the\op@count@i}<
+ \@nameuse{OP@cb@\the\op@count@ii}\relax
\op@againfalse
\global\oplttrue
\global\opletrue
\global\opneqtrue
- \else \ifnum\count@i=1\relax
+ \else \ifnum\op@count@i=1\relax
\op@againfalse
- \ifnum\count@ii=1\relax
+ \ifnum\op@count@ii=1\relax
\global\opeqtrue
\global\opgetrue
\global\opletrue
@@ -1047,14 +1080,14 @@
\global\opletrue
\global\opneqtrue
\fi
- \else \ifnum\count@ii=1\relax
+ \else \ifnum\op@count@ii=1\relax
\op@againfalse
\global\opgttrue
\global\opgetrue
\global\opneqtrue
\fi\fi\fi\fi
- \advance\count@i by-1
- \advance\count@ii by-1
+ \advance\op@count@i by-1
+ \advance\op@count@ii by-1
\repeat
\fi\fi
\ifnum\OP@ca@s=1\relax
@@ -1221,56 +1254,56 @@
\def\op@add#1#2#3{%
\begingroup
\global\op@carryfalse
- \count@i=\op@max{\@nameuse{OP@#1@i}}{\@nameuse{OP@#2@i}}%
- \count@ii=\op@max{\@nameuse{OP@#1@d}}{\@nameuse{OP@#2@d}}%
- \op@format{\the\count@i}{\the\count@ii}{#1}%
- \op@format{\the\count@i}{\the\count@ii}{#2}%
- \@namexdef{OP@#3@i}{\the\count@i}%
- \@namexdef{OP@#3@d}{\the\count@ii}%
+ \op@count@i=\op@max{\@nameuse{OP@#1@i}}{\@nameuse{OP@#2@i}}%
+ \op@count@ii=\op@max{\@nameuse{OP@#1@d}}{\@nameuse{OP@#2@d}}%
+ \op@format{\the\op@count@i}{\the\op@count@ii}{#1}%
+ \op@format{\the\op@count@i}{\the\op@count@ii}{#2}%
+ \@namexdef{OP@#3@i}{\the\op@count@i}%
+ \@namexdef{OP@#3@d}{\the\op@count@ii}%
\@namexdef{OP@#3@s}{0}%
\xdef\OP@carry@s{0}%
\xdef\OP@carry@d{0}%
- \advance\count@i by\count@ii
- \@namexdef{OP@#3@w}{\the\count@i}%
- \xdef\OP@carry@i{\the\count@i}%
- \xdef\OP@carry@w{\the\count@i}%
- \count@ii=1
+ \advance\op@count@i by\op@count@ii
+ \@namexdef{OP@#3@w}{\the\op@count@i}%
+ \xdef\OP@carry@i{\the\op@count@i}%
+ \xdef\OP@carry@w{\the\op@count@i}%
+ \op@count@ii=1
\def\op@carry{0}%
\@namexdef{OP@carry@1}{ }%
\loop
- \count@z=\@nameuse{OP@#1@\the\count@ii}%
- \advance\count@z by\@nameuse{OP@#2@\the\count@ii}%
- \advance\count@z by\op@carry\relax
- \ifnum\count@z>9
- \advance\count@z by-10
+ \op@count@z=\@nameuse{OP@#1@\the\op@count@ii}%
+ \advance\op@count@z by\@nameuse{OP@#2@\the\op@count@ii}%
+ \advance\op@count@z by\op@carry\relax
+ \ifnum\op@count@z>9
+ \advance\op@count@z by-10
\def\op@carry{1}%
\global\op@carrytrue
\else
\def\op@carry{0}%
\fi
- \@namexdef{OP@#3@\the\count@ii}{\the\count@z}%
- \ifnum\count@ii<\count@i
- \advance\count@ii by1\relax
+ \@namexdef{OP@#3@\the\op@count@ii}{\the\op@count@z}%
+ \ifnum\op@count@ii<\op@count@i
+ \advance\op@count@ii by1\relax
\ifnum\op@carry=0
- \@namexdef{OP@carry@\the\count@ii}{ }%
+ \@namexdef{OP@carry@\the\op@count@ii}{ }%
\else
- \@namexdef{OP@carry@\the\count@ii}{1}%
+ \@namexdef{OP@carry@\the\op@count@ii}{1}%
\global\op@carrytrue
\fi
\repeat
\ifnum\op@carry=1
- \advance\count@i by1
- \@namexdef{OP@#3@w}{\the\count@i}%
- \@namexdef{OP@#3@\the\count@i}{1}%
+ \advance\op@count@i by1
+ \@namexdef{OP@#3@w}{\the\op@count@i}%
+ \@namexdef{OP@#3@\the\op@count@i}{1}%
\ifop@lastcarry
- \@namexdef{OP@carry@w}{\the\count@i}%
- \@namexdef{OP@carry@i}{\the\count@i}%
- \@namexdef{OP@carry@\the\count@i}{1}%
+ \@namexdef{OP@carry@w}{\the\op@count@i}%
+ \@namexdef{OP@carry@i}{\the\op@count@i}%
+ \@namexdef{OP@carry@\the\op@count@i}{1}%
\global\op@carrytrue
\fi
- \count@i=\@nameuse{OP@#3@i}\relax
- \advance\count@i by1
- \@namexdef{OP@#3@i}{\the\count@i}%
+ \op@count@i=\@nameuse{OP@#3@i}\relax
+ \advance\op@count@i by1
+ \@namexdef{OP@#3@i}{\the\op@count@i}%
\fi
\endgroup
}
@@ -1376,45 +1409,45 @@
\def\op@sub#1#2#3{%
\begingroup
\global\op@carryfalse
- \count@i=\op@max{\@nameuse{OP@#1@i}}{\@nameuse{OP@#2@i}}\relax
- \count@ii=\op@max{\@nameuse{OP@#1@d}}{\@nameuse{OP@#2@d}}\relax
- \count@iii=\@nameuse{OP@#2@w}\relax
- \advance\count@iii by1
- \op@format{\the\count@i}{\the\count@ii}{#1}%
- \op@format{\the\count@i}{\the\count@ii}{#2}%
- \@namexdef{OP@#3@i}{\the\count@i}%
- \@namexdef{OP@#3@d}{\the\count@ii}%
+ \op@count@i=\op@max{\@nameuse{OP@#1@i}}{\@nameuse{OP@#2@i}}\relax
+ \op@count@ii=\op@max{\@nameuse{OP@#1@d}}{\@nameuse{OP@#2@d}}\relax
+ \op@count@iii=\@nameuse{OP@#2@w}\relax
+ \advance\op@count@iii by1
+ \op@format{\the\op@count@i}{\the\op@count@ii}{#1}%
+ \op@format{\the\op@count@i}{\the\op@count@ii}{#2}%
+ \@namexdef{OP@#3@i}{\the\op@count@i}%
+ \@namexdef{OP@#3@d}{\the\op@count@ii}%
\@namexdef{OP@#3@s}{0}%
\xdef\OP@carry@s{0}%
\xdef\OP@carry@d{0}%
- \advance\count@i by\count@ii
- \@namexdef{OP@#3@w}{\the\count@i}%
- \xdef\OP@carry@i{\the\count@i}%
- \xdef\OP@carry@w{\the\count@i}%
- \count@ii=1
+ \advance\op@count@i by\op@count@ii
+ \@namexdef{OP@#3@w}{\the\op@count@i}%
+ \xdef\OP@carry@i{\the\op@count@i}%
+ \xdef\OP@carry@w{\the\op@count@i}%
+ \op@count@ii=1
\def\op@carry{0}%
\@namexdef{OP@carry@1}{ }%
\loop
- \count@z=\@nameuse{OP@#1@\the\count@ii}%
- \advance\count@z by-\@nameuse{OP@#2@\the\count@ii}%
- \advance\count@z by-\op@carry\relax
- \ifnum\count@z<0
- \advance\count@z by10
+ \op@count@z=\@nameuse{OP@#1@\the\op@count@ii}%
+ \advance\op@count@z by-\@nameuse{OP@#2@\the\op@count@ii}%
+ \advance\op@count@z by-\op@carry\relax
+ \ifnum\op@count@z<0
+ \advance\op@count@z by10
\def\op@carry{1}%
\else
\def\op@carry{0}%
\fi
- \@namexdef{OP@#3@\the\count@ii}{\the\count@z}%
- \ifnum\count@ii<\count@i
- \advance\count@ii by1\relax
- \@namexdef{OP@carry@\the\count@ii}{ }%
+ \@namexdef{OP@#3@\the\op@count@ii}{\the\op@count@z}%
+ \ifnum\op@count@ii<\op@count@i
+ \advance\op@count@ii by1\relax
+ \@namexdef{OP@carry@\the\op@count@ii}{ }%
\ifnum\op@carry=0 \else
\ifop@lastcarry
- \@namexdef{OP@carry@\the\count@ii}{1}%
+ \@namexdef{OP@carry@\the\op@count@ii}{1}%
\global\op@carrytrue
\else
- \ifnum\count@ii<\count@iii\relax
- \@namexdef{OP@carry@\the\count@ii}{1}%
+ \ifnum\op@count@ii<\op@count@iii\relax
+ \@namexdef{OP@carry@\the\op@count@ii}{1}%
\global\op@carrytrue
\fi
\fi
@@ -1434,14 +1467,14 @@
\op@format{\OP@a@i}{\OP@b@d}{a}%
\fi
\fi
- \count@i=\op@max{\OP@a@i}{\OP@b@i}%
- \count@i=\op@max{\the\count@i}{\OP@r@i}%
- \advance\count@i by1
- \count@ii=\op@max{\OP@a@d}{\OP@b@d}%
- \count@ii=\op@max{\the\count@ii}{\OP@r@d}%
- \count@z=\count@i
- \advance\count@z by\count@ii
- \setbox1=\hbox to\count@z\opcolumnwidth{%
+ \op@count@i=\op@max{\OP@a@i}{\OP@b@i}%
+ \op@count@i=\op@max{\the\op@count@i}{\OP@r@i}%
+ \advance\op@count@i by1
+ \op@count@ii=\op@max{\OP@a@d}{\OP@b@d}%
+ \op@count@ii=\op@max{\the\op@count@ii}{\OP@r@d}%
+ \op@count@z=\op@count@i
+ \advance\op@count@z by\op@count@ii
+ \setbox1=\hbox to\op@count@z\opcolumnwidth{%
\ifx\op@voperator\op@string@top
\oplput(0,2){\op@realsymbol}%
\else\ifx\op@voperator\op@string@bottom
@@ -1449,16 +1482,16 @@
\else
\oplput(0,1.5){\op@realsymbol}%
\fi\fi
- \ophline(0,0.75){\the\count@z}%
+ \ophline(0,0.75){\the\op@count@z}%
\ifnum\OP@r@d>0\relax
- \oplput(\the\count@z,0.75){%
+ \oplput(\the\op@count@z,0.75){%
\vrule width\op@decimalsepwidth
depth0.5\op@hrulewidth height0.5\op@hrulewidth}
\fi
\ifx\op@realsymbol\op@subsymbol
\ifop@carrysub
\ifop@carry
- \op@makebox{\the\count@z}{0}{carrystyle}{carry}%
+ \op@makebox{\the\op@count@z}{0}{carrystyle}{carry}%
\oplput(\op@offsetcarry,2){\kern\opcolumnwidth\copy0}%
\oplput(\op@offsetcarry,1){\box0}%
\fi
@@ -1468,16 +1501,16 @@
\ifx\op@realsymbol\op@addsymbol
\ifop@carryadd
\ifop@carry
- \op@makebox{\the\count@z}{0}{carrystyle}{carry}%
+ \op@makebox{\the\op@count@z}{0}{carrystyle}{carry}%
\hbox{\box0}%
\fi
\fi
\fi
- \op@makebox{\the\count@i}{\the\count@ii}{operandstyle.1}{a}%
+ \op@makebox{\the\op@count@i}{\the\op@count@ii}{operandstyle.1}{a}%
\hbox{\box0}%
- \op@makebox{\the\count@i}{\the\count@ii}{operandstyle.2}{b}%
+ \op@makebox{\the\op@count@i}{\the\op@count@ii}{operandstyle.2}{b}%
\hbox{\box0}%
- \op@makebox{\the\count@i}{\the\count@ii}{resultstyle}{r}%
+ \op@makebox{\the\op@count@i}{\the\op@count@ii}{resultstyle}{r}%
\hbox{\box0}%
}%
}%
@@ -1562,31 +1595,31 @@
\expandafter\if\csname OP@b@\OP@b@w\endcsname0
\ifnum\OP@r@i>1
\expandafter\if\csname OP@r@\OP@r@w\endcsname0
- \count@i=\OP@r@w
- \advance\count@i\m@ne
- \edef\OP@r@w{\the\count@i}%
- \count@i=\OP@r@i
- \advance\count@i\m@ne
- \edef\OP@r@i{\the\count@i}%
+ \op@count@i=\OP@r@w
+ \advance\op@count@i\m@ne
+ \edef\OP@r@w{\the\op@count@i}%
+ \op@count@i=\OP@r@i
+ \advance\op@count@i\m@ne
+ \edef\OP@r@i{\the\op@count@i}%
\fi\fi\fi\fi
\setbox1=\hbox to\OP@r@w\opcolumnwidth{%
\vbox{%
\ifx\op@hfactor\op@string@right
- \count@i=\OP@r@w
- \advance\count@i by-\OP@a@d
- \op@makebox{\the\count@i}{\OP@a@d}{operandstyle.1}{a}%
+ \op@count@i=\OP@r@w
+ \advance\op@count@i by-\OP@a@d
+ \op@makebox{\the\op@count@i}{\OP@a@d}{operandstyle.1}{a}%
\hbox{\box0}%
- \count@i=\OP@r@w
- \advance\count@i by-\OP@b@d
- \op@makebox{\the\count@i}{\OP@b@d}{operandstyle.2}{b}%
+ \op@count@i=\OP@r@w
+ \advance\op@count@i by-\OP@b@d
+ \op@makebox{\the\op@count@i}{\OP@b@d}{operandstyle.2}{b}%
\hbox{\box0}%
\else
- \count@i=\OP@r@w
- \count@ii=\op@max{\OP@a@d}{\OP@b@d}%
- \advance\count@i by-\count@ii
- \op@makebox{\the\count@i}{\the\count@ii}{operandstyle.1}{a}%
+ \op@count@i=\OP@r@w
+ \op@count@ii=\op@max{\OP@a@d}{\OP@b@d}%
+ \advance\op@count@i by-\op@count@ii
+ \op@makebox{\the\op@count@i}{\the\op@count@ii}{operandstyle.1}{a}%
\hbox{\box0}%
- \op@makebox{\the\count@i}{\the\count@ii}{operandstyle.2}{b}%
+ \op@makebox{\the\op@count@i}{\the\op@count@ii}{operandstyle.2}{b}%
\hbox{\box0}%
\fi
\op@againtrue
@@ -1595,31 +1628,31 @@
\op@againfalse
\fi
\fi
- \global\count@z=0\relax
+ \global\op@count@z=0\relax
\ifop@again
- \count@ii=0\relax
+ \op@count@ii=0\relax
\setbox2=\hbox{}%
\loop
- \ifnum\count@ii<\OP@b@w
- \advance\count@ii by1
- \count@iii=\@nameuse{OP@b@\the\count@ii}%
- \count@iv=\OP@r@w
- \advance\count@iv by-\count@ii
- \advance\count@iv by1
- \op@makebox{\the\count@iv}{0}%
- {intermediarystyle.\the\count@ii}{T\the\count@iii}%
+ \ifnum\op@count@ii<\OP@b@w
+ \advance\op@count@ii by1
+ \op@count@iii=\@nameuse{OP@b@\the\op@count@ii}%
+ \op@count@iv=\OP@r@w
+ \advance\op@count@iv by-\op@count@ii
+ \advance\op@count@iv by1
+ \op@makebox{\the\op@count@iv}{0}%
+ {intermediarystyle.\the\op@count@ii}{T\the\op@count@iii}%
\ifx\op@displayintermediary\op@string@all
\hbox{\box0\copy2}%
- \global\advance\count@z by1
+ \global\advance\op@count@z by1
\else
- \ifnum\the\count@iii=0
+ \ifnum\the\op@count@iii=0
\ifx\op@displayshiftintermediary\op@string@shift
\setbox2=\hbox{\box2\hbox to\opcolumnwidth{%
\hss\op@shiftintermediarysymbol\hss}}%
\fi
\else
\hbox{\box0\copy2}%
- \global\advance\count@z by1
+ \global\advance\op@count@z by1
\ifx\op@displayshiftintermediary\op@string@shift
\setbox2=\hbox{}%
\fi
@@ -1634,46 +1667,46 @@
\op@makebox{\OP@r@i}{\OP@r@d}{resultstyle}{r}%
\hbox{\box0}%
}%
- \count@i=\OP@r@w
- \ophline(-\the\count@i,0.75){\the\count@i}%
+ \op@count@i=\OP@r@w
+ \ophline(-\the\op@count@i,0.75){\the\op@count@i}%
\ifnum\OP@r@d>0\relax
- \oprput(-\the\count@i,0.75){%
+ \oprput(-\the\op@count@i,0.75){%
\vrule width\op@decimalsepwidth
depth0.5\op@hrulewidth height0.5\op@hrulewidth}
\fi
\ifx\op@hfactor\op@string@right
- \count@i=\op@max{\OP@a@w}{\OP@b@w}%
+ \op@count@i=\op@max{\OP@a@w}{\OP@b@w}%
\else
- \count@i=\op@max{\OP@a@d}{\OP@b@d}%
- \advance\count@i by\op@max{\OP@a@i}{\OP@b@i}%
+ \op@count@i=\op@max{\OP@a@d}{\OP@b@d}%
+ \advance\op@count@i by\op@max{\OP@a@i}{\OP@b@i}%
\fi
- \advance\count@i by1\relax
- \ophline(-\the\count@i,\the\count@z.75){\the\count@i}%
+ \advance\op@count@i by1\relax
+ \ophline(-\the\op@count@i,\the\op@count@z.75){\the\op@count@i}%
\ifx\op@voperator\op@string@top
- \advance\count@z by2
- \oplput(-\the\count@i,\the\count@z){\op@mulsymbol}%
- \advance\count@z by-2
+ \advance\op@count@z by2
+ \oplput(-\the\op@count@i,\the\op@count@z){\op@mulsymbol}%
+ \advance\op@count@z by-2
\else\ifx\op@voperator\op@string@bottom
- \advance\count@z by1
- \oplput(-\the\count@i,\the\count@z){\op@mulsymbol}%
- \advance\count@z by-1
+ \advance\op@count@z by1
+ \oplput(-\the\op@count@i,\the\op@count@z){\op@mulsymbol}%
+ \advance\op@count@z by-1
\else
- \advance\count@z by1
- \oplput(-\the\count@i,\the\count@z.5){\op@mulsymbol}%
- \advance\count@z by-1
+ \advance\op@count@z by1
+ \oplput(-\the\op@count@i,\the\op@count@z.5){\op@mulsymbol}%
+ \advance\op@count@z by-1
\fi\fi
}%
\leavevmode
\ifx\op@voperation\op@string@center
- \advance\count@z by3
+ \advance\op@count@z by3
\dimen0=\oplineheight
- \multiply\dimen0 by\count@z
+ \multiply\dimen0 by\op@count@z
\dimen0=0.5\dimen0
\lower\dimen0\box1
\else\ifx\op@voperation\op@string@top
- \advance\count@z by2
+ \advance\op@count@z by2
\dimen0=\oplineheight
- \multiply\dimen0 by\count@z
+ \multiply\dimen0 by\op@count@z
\lower\dimen0\box1
\else
\box1
@@ -1684,33 +1717,33 @@
\def\op@mul#1#2#3{%
\begingroup
\op@multable{#1}%
- \count@z=\@nameuse{OP@#2@w}\relax
+ \op@count@z=\@nameuse{OP@#2@w}\relax
\op@copy{zero}{mr}%
\loop
- \count@iii=\@nameuse{OP@#2@\the\count@z}%
- \advance\count@z by-1
- \op@copy{T\the\count@iii}{rr}%
- \op@lshift{\the\count@z}{rr}%
+ \op@count@iii=\@nameuse{OP@#2@\the\op@count@z}%
+ \advance\op@count@z by-1
+ \op@copy{T\the\op@count@iii}{rr}%
+ \op@lshift{\the\op@count@z}{rr}%
\op@add{rr}{mr}{mr}%
- \ifnum\count@z>0
+ \ifnum\op@count@z>0
\repeat
- \count@z=\@nameuse{OP@#1@d}%
- \advance\count@z by\@nameuse{OP@#2@d}%
- \xdef\OP@mr@d{\the\count@z}%
- \count@i=\OP@mr@w
- \advance\count@i by-\count@z
- \ifnum\count@i>0\relax
- \xdef\OP@mr@i{\the\count@i}%
+ \op@count@z=\@nameuse{OP@#1@d}%
+ \advance\op@count@z by\@nameuse{OP@#2@d}%
+ \xdef\OP@mr@d{\the\op@count@z}%
+ \op@count@i=\OP@mr@w
+ \advance\op@count@i by-\op@count@z
+ \ifnum\op@count@i>0\relax
+ \xdef\OP@mr@i{\the\op@count@i}%
\else
\xdef\OP@mr@i{1}%
- \count@z=\@nameuse{OP@mr@d}%
- \advance\count@z by1
- \count@i=\@nameuse{OP@mr@w}%
- \@namexdef{OP@mr@w}{\the\count@z}%
+ \op@count@z=\@nameuse{OP@mr@d}%
+ \advance\op@count@z by1
+ \op@count@i=\@nameuse{OP@mr@w}%
+ \@namexdef{OP@mr@w}{\the\op@count@z}%
\loop
- \ifnum\count@i<\count@z
- \advance\count@i by1
- \@namexdef{OP@mr@\the\count@i}{0}%
+ \ifnum\op@count@i<\op@count@z
+ \advance\op@count@i by1
+ \@namexdef{OP@mr@\the\op@count@i}{0}%
\repeat
\fi
\op@copy{mr}{#3}%
@@ -1721,6 +1754,7 @@
\@namexdef{OP@T1@i}{\@nameuse{OP@T1@w}}%
\@namexdef{OP@T1@d}{0}%
\@namexdef{OP@T1@s}{0}%
+ \op@unzero{T1}%
\op@add{T1}{T1}{T2}%
\op@add{T1}{T2}{T3}%
\op@add{T1}{T3}{T4}%
@@ -1729,46 +1763,45 @@
\op@add{T1}{T6}{T7}%
\op@add{T1}{T7}{T8}%
\op@add{T1}{T8}{T9}%
- \op@unzero{T1}%
\op@format{\@nameuse{OP@T1@i}}{\@nameuse{OP@T1@d}}{T0}%
}
\def\op@lshift#1#2{%
\begingroup
- \count@i=#1\relax
- \count@z=\@nameuse{OP@#2@w}\relax
- \advance\count@i by\count@z
- \@namexdef{OP@#2@w}{\the\count@i}%
- \@namexdef{OP@#2@i}{\the\count@i}%
+ \op@count@i=#1\relax
+ \op@count@z=\@nameuse{OP@#2@w}\relax
+ \advance\op@count@i by\op@count@z
+ \@namexdef{OP@#2@w}{\the\op@count@i}%
+ \@namexdef{OP@#2@i}{\the\op@count@i}%
\loop
- \ifnum\count@z>0
- \@namexdef{OP@#2@\the\count@i}{\@nameuse{OP@#2@\the\count@z}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#2@\the\op@count@i}{\@nameuse{OP@#2@\the\op@count@z}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
\loop
- \ifnum\count@i>0
- \@namexdef{OP@#2@\the\count@i}{0}%
- \advance\count@i by-1
+ \ifnum\op@count@i>0
+ \@namexdef{OP@#2@\the\op@count@i}{0}%
+ \advance\op@count@i by-1
\repeat
\endgroup
}
\def\op@rshift#1#2{%
\begingroup
- \count@i=#1\relax
- \count@z=\@nameuse{OP@#2@w}\relax
- \advance\count@z by-\count@i
- \ifnum\count@z>0
- \@namexdef{OP@#2@w}{\the\count@z}%
- \@namexdef{OP@#2@i}{\the\count@z}%
+ \op@count@i=#1\relax
+ \op@count@z=\@nameuse{OP@#2@w}\relax
+ \advance\op@count@z by-\op@count@i
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#2@w}{\the\op@count@z}%
+ \@namexdef{OP@#2@i}{\the\op@count@z}%
\@namexdef{OP@#2@d}{0}%
\@namexdef{OP@#2@s}{0}%
- \advance\count@i by1\relax
- \count@ii=1
+ \advance\op@count@i by1\relax
+ \op@count@ii=1
\loop
- \@namexdef{OP@#2@\the\count@ii}{\@nameuse{OP@#2@\the\count@i}}%
- \advance\count@i by1
- \ifnum\count@ii<\count@z
- \advance\count@ii by1
+ \@namexdef{OP@#2@\the\op@count@ii}{\@nameuse{OP@#2@\the\op@count@i}}%
+ \advance\op@count@i by1
+ \ifnum\op@count@ii<\op@count@z
+ \advance\op@count@ii by1
\repeat
\else
\op@copy{zero}{#2}%
@@ -1782,6 +1815,16 @@
\opset{#1}
\op@split{#2}{a}%
\op@split{#3}{b}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Ajout du 20/11/2006 %%%
+%%% Sur indication de Cristophe Poulain %%%
+ \op@cmp{b}{zero}%
+ \ifopeq
+ \op@error{divisor must be nonzero}%
+ {You have to learn some math}%
+ \fi
+%%% Fin ajout %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifop@error
\op@errorwrite
\else
@@ -1825,6 +1868,16 @@
\opset{#1}%
\op@split{#2}{a}%
\op@split{#3}{b}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Ajout du 20/11/2006 %%%
+%%% Sur indication de Cristophe Poulain %%%
+ \op@cmp{b}{zero}%
+ \ifopeq
+ \op@error{divisor must be nonzero}%
+ {You have to learn some math}%
+ \fi
+%%% Fin ajout %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifop@error
\op@errorwrite
\else
@@ -1862,35 +1915,35 @@
\op@unzero{b}%
\ifx\op@shiftdecimalsep\op@string@none
\def\op@shift{0}%
- \count@v=\OP@a@d
- \advance\count@v by-\OP@b@d\relax
- \ifnum\count@v>0
- \op@divpowerten{qq}{\the\count@v}%
+ \op@count@v=\OP@a@d
+ \advance\op@count@v by-\OP@b@d\relax
+ \ifnum\op@count@v>0
+ \op@divpowerten{qq}{\the\op@count@v}%
\else
- \count@v=-\count@v
- \op@mulpowerten{qq}{\the\count@v}%
+ \op@count@v=-\op@count@v
+ \op@mulpowerten{qq}{\the\op@count@v}%
\fi
\else\ifx\op@shiftdecimalsep\op@string@divisor
\edef\op@shift{\OP@a@d}%
- \count@v=\OP@a@d
- \advance\count@v by-\OP@b@d\relax
- \ifnum\count@v>0
- \op@divpowerten{qq}{\the\count@v}%
+ \op@count@v=\OP@a@d
+ \advance\op@count@v by-\OP@b@d\relax
+ \ifnum\op@count@v>0
+ \op@divpowerten{qq}{\the\op@count@v}%
\else
- \count@v=-\count@v
- \op@mulpowerten{qq}{\the\count@v}%
+ \op@count@v=-\op@count@v
+ \op@mulpowerten{qq}{\the\op@count@v}%
\fi
\edef\op@shift{\OP@b@d}%
\op@split{#2}{a}%
\ifx\op@strikedecimalsepsymbol\empty
\op@unzero{a}%
\else
- \count@z=\OP@a@w
+ \op@count@z=\OP@a@w
\fi
\op@mulpowerten{a}{\OP@b@d}%
\ifx\op@strikedecimalsepsymbol\empty\else
- \advance\count@z by-\OP@a@d
- \op@format{\the\count@z}{\OP@a@d}{a}%
+ \advance\op@count@z by-\OP@a@d
+ \op@format{\the\op@count@z}{\OP@a@d}{a}%
\fi
\xdef\OP@b@i{\OP@b@w}%
\xdef\OP@b@d{0}%
@@ -1903,16 +1956,16 @@
\op@unzero{a}%
\op@unzero{b}%
\else
- \count@z=\OP@a@w
- \count@i=\OP@b@w
+ \op@count@z=\OP@a@w
+ \op@count@i=\OP@b@w
\fi
\op@mulpowerten{a}{\op@shift}%
\op@mulpowerten{b}{\op@shift}%
\ifx\op@strikedecimalsepsymbol\empty\else
- \advance\count@z by-\OP@a@d
- \op@format{\the\count@z}{\OP@a@d}{a}%
- \advance\count@i by-\OP@b@d
- \op@format{\the\count@i}{\OP@b@d}{b}%
+ \advance\op@count@z by-\OP@a@d
+ \op@format{\the\op@count@z}{\OP@a@d}{a}%
+ \advance\op@count@i by-\OP@b@d
+ \op@format{\the\op@count@i}{\OP@b@d}{b}%
\fi
\fi\fi
\ifx\op@country\op@string@french
@@ -1999,6 +2052,16 @@
\begingroup
\op@split{#1}{a}%
\op@split{#2}{b}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Ajout du 20/11/2006 %%%
+%%% Sur indication de Cristophe Poulain %%%
+ \op@cmp{b}{zero}%
+ \ifopeq
+ \op@error{divisor must be nonzero}%
+ {You have to learn some math}%
+ \fi
+%%% Fin ajout %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifop@error
\op@errorwrite
\else
@@ -2041,6 +2104,16 @@
\let\op@shiftdecimalsep\op@string@both
\op@split{#2}{a}%
\op@split{#3}{b}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Ajout du 20/11/2006 %%%
+%%% Sur indication de Cristophe Poulain %%%
+ \op@cmp{b}{zero}%
+ \ifopeq
+ \op@error{divisor must be nonzero}%
+ {You have to learn some math}%
+ \fi
+%%% Fin ajout %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifop@error
\op@errorwrite
\else
@@ -2062,16 +2135,16 @@
\op@copy{q}{qq}%
\edef\op@shift{\op@max{\OP@a@d}{\OP@b@d}}%
\ifx\op@strikedecimalsepsymbol\empty\else
- \count@z=\OP@a@w
- \count@i=\OP@b@w
+ \op@count@z=\OP@a@w
+ \op@count@i=\OP@b@w
\fi
\op@mulpowerten{a}{\op@shift}%
\op@mulpowerten{b}{\op@shift}%
\ifx\op@strikedecimalsepsymbol\empty\else
- \advance\count@z by-\OP@a@d
- \op@format{\the\count@z}{\OP@a@d}{a}%
- \advance\count@i by-\OP@b@d
- \op@format{\the\count@i}{\OP@b@d}{b}%
+ \advance\op@count@z by-\OP@a@d
+ \op@format{\the\op@count@z}{\OP@a@d}{a}%
+ \advance\op@count@i by-\OP@b@d
+ \op@format{\the\op@count@i}{\OP@b@d}{b}%
\fi
\ifx\op@country\op@string@french
\op@divdisplayone
@@ -2162,23 +2235,23 @@
}
\def\op@divdisplayone{%
\begingroup
- \count@z=\z@\relax
- \count@i=\OP@a@w
+ \op@count@z=\z@\relax
+ \op@count@i=\OP@a@w
\loop
- \ifnum\@nameuse{OP@a@\the\count@i}=0
- \advance\count@i by-1
- \advance\count@z by1
+ \ifnum\@nameuse{OP@a@\the\op@count@i}=0
+ \advance\op@count@i by-1
+ \advance\op@count@z by1
\repeat
- \count@i=\op@firstlength
- \advance\count@i by\count@z
- \xdef\op@firstlength{\the\count@i}%
+ \op@count@i=\op@firstlength
+ \advance\op@count@i by\op@count@z
+ \xdef\op@firstlength{\the\op@count@i}%
\setbox2=\vbox{%
- \count@i=\op@firstlength
- \advance\count@i by1
+ \op@count@i=\op@firstlength
+ \advance\op@count@i by1
\hbox{%
\ifx\op@displayintermediary\op@string@none\else
\kern\opcolumnwidth
- \advance\count@i by1
+ \advance\op@count@i by1
\fi
\ifop@dividendbridge
\vrule width0pt depth0pt height\oplineheight
@@ -2188,19 +2261,19 @@
\fi
\op@display{operandstyle.1}{a}%
\ifnum\op@shift=0\relax\else
- \count@v=\op@shift
- \advance\count@v by\OP@a@d
- \oplput(-\the\count@v,0){\op@strikedecimalsepsymbol}%
+ \op@count@v=\op@shift
+ \advance\op@count@v by\OP@a@d
+ \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}%
\fi
}%
- \count@z=\OP@q@w
- \count@ii=1\relax
+ \op@count@z=\OP@q@w
+ \op@count@ii=1\relax
\ifx\op@displayintermediary\op@string@none
- \advance\count@i by-1\relax
+ \advance\op@count@i by-1\relax
\else
- \count@iv=\@nameuse{OP@q@\the\count@z}\relax
- \count@iii=\count@i
- \advance\count@iii by-\@nameuse{OP@T\the\count@iv @w}%
+ \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax
+ \op@count@iii=\op@count@i
+ \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%
\hbox{%
\ifx\op@voperator\op@string@center
\oplput(0,0.5){\op@subsymbol}%
@@ -2210,31 +2283,31 @@
\oplput(0,0){\op@subsymbol}%
\fi\fi
\ophline(1,-0.25){\op@firstlength}%
- \advance\count@ii by1
- \kern\count@iii\opcolumnwidth
+ \advance\op@count@ii by1
+ \kern\op@count@iii\opcolumnwidth
\op@display{intermediarystyle.1}%
- {T\the\count@iv}%
+ {T\the\op@count@iv}%
}%
\fi
{\global\setbox4=\hbox{}\setbox4=\box4}%
\loop
- \advance\count@z by-1
- \advance\count@i by1\relax
- \ifnum\count@z>0\relax
- \count@iv=\@nameuse{OP@q@\the\count@z}\relax
- \ifnum\count@iv=0
+ \advance\op@count@z by-1
+ \advance\op@count@i by1\relax
+ \ifnum\op@count@z>0\relax
+ \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax
+ \ifnum\op@count@iv=0
\ifx\op@displayintermediary\op@string@all
- \count@v=\count@i
- \advance\count@v by-\@nameuse{OP@R\the\count@ii @w}%
+ \op@count@v=\op@count@i
+ \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}%
\hbox{%
- \kern\count@v\opcolumnwidth
- \op@display{remainderstyle.\the\count@ii}%
- {R\the\count@ii}%
+ \kern\op@count@v\opcolumnwidth
+ \op@display{remainderstyle.\the\op@count@ii}%
+ {R\the\op@count@ii}%
}%
- \count@iii=\count@i
- \advance\count@iii by-\@nameuse{OP@T\the\count@iv @w}%
+ \op@count@iii=\op@count@i
+ \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%
\hbox{%
- \kern\count@v\opcolumnwidth
+ \kern\op@count@v\opcolumnwidth
\ifx\op@voperator\op@string@center
\oplput(-1,0.5){\op@subsymbol}%
\else\ifx\op@voperator\op@string@top
@@ -2242,39 +2315,39 @@
\else
\oplput(-1,0){\op@subsymbol}%
\fi\fi
- \ophline(0,-0.25){\@nameuse{OP@R\the\count@ii @w}}%
- \kern-\count@v\opcolumnwidth
- \kern\count@iii\opcolumnwidth
- \op@display{intermediarystyle.\the\count@ii}%
- {T\the\count@iv}%
+ \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}%
+ \kern-\op@count@v\opcolumnwidth
+ \kern\op@count@iii\opcolumnwidth
+ \op@display{intermediarystyle.\the\op@count@ii}%
+ {T\the\op@count@iv}%
}%
\else
- \ifnum\@nameuse{OP@R\the\count@ii @w}=2
- \ifnum\@nameuse{OP@R\the\count@ii @2}=0
- \op@makebox{1}{0}{remainderstyle.\the\count@ii.1}{zero}%
+ \ifnum\@nameuse{OP@R\the\op@count@ii @w}=2
+ \ifnum\@nameuse{OP@R\the\op@count@ii @2}=0
+ \op@makebox{1}{0}{remainderstyle.\the\op@count@ii.1}{zero}%
\setbox4=\hbox to\opcolumnwidth{\hss\box0\hss}%
\fi
\fi
\fi
- \advance\count@ii by1\relax
+ \advance\op@count@ii by1\relax
\else
- \count@v=\count@i
- \advance\count@v by-\@nameuse{OP@R\the\count@ii @w}%
+ \op@count@v=\op@count@i
+ \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}%
\ifvoid4\relax\else
- \advance\count@v by-1
+ \advance\op@count@v by-1
\fi
\hbox{%
- \kern\count@v\opcolumnwidth\copy4
- \op@display{remainderstyle.\the\count@ii}%
- {R\the\count@ii}%
+ \kern\op@count@v\opcolumnwidth\copy4
+ \op@display{remainderstyle.\the\op@count@ii}%
+ {R\the\op@count@ii}%
}%
- \advance\count@ii by1\relax
+ \advance\op@count@ii by1\relax
\ifx\op@displayintermediary\op@string@none
\else
- \count@iii=\count@i
- \advance\count@iii by-\@nameuse{OP@T\the\count@iv @w}%
+ \op@count@iii=\op@count@i
+ \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%
\hbox{%
- \kern\count@v\opcolumnwidth
+ \kern\op@count@v\opcolumnwidth
\ifx\op@voperator\op@string@center
\oplput(-1,0.5){\op@subsymbol}%
\else\ifx\op@voperator\op@string@top
@@ -2282,40 +2355,40 @@
\else
\oplput(-1,0){\op@subsymbol}%
\fi\fi
- \advance\count@ii by-1
+ \advance\op@count@ii by-1
\ifvoid4\relax
- \ophline(0,-0.25){\@nameuse{OP@R\the\count@ii @w}}%
+ \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}%
\else
- \ophline(0,-0.25){\@nameuse{OP@T\the\count@iv @w}}%
- \ophline(\@nameuse{OP@T\the\count@iv @w},-0.25){1}%
+ \ophline(0,-0.25){\@nameuse{OP@T\the\op@count@iv @w}}%
+ \ophline(\@nameuse{OP@T\the\op@count@iv @w},-0.25){1}%
{\setbox4=\box4}%
\fi
- \advance\count@ii by1
- \kern-\count@v\opcolumnwidth
- \kern\count@iii\opcolumnwidth
- \op@display{intermediarystyle.\the\count@ii}%
- {T\the\count@iv}%
+ \advance\op@count@ii by1
+ \kern-\op@count@v\opcolumnwidth
+ \kern\op@count@iii\opcolumnwidth
+ \op@display{intermediarystyle.\the\op@count@ii}%
+ {T\the\op@count@iv}%
}%
\fi
\fi
\repeat
- \advance\count@i by-1
- \count@iii=\count@i
- \advance\count@iii by-\@nameuse{OP@R\the\count@ii @w}%
+ \advance\op@count@i by-1
+ \op@count@iii=\op@count@i
+ \advance\op@count@iii by-\@nameuse{OP@R\the\op@count@ii @w}%
\hbox{%
- \kern\count@iii\opcolumnwidth
- \op@display{remainderstyle.\the\count@ii}%
- {R\the\count@ii}%
+ \kern\op@count@iii\opcolumnwidth
+ \op@display{remainderstyle.\the\op@count@ii}%
+ {R\the\op@count@ii}%
}%
}%
\setbox3=\vbox{%
- \count@v=\op@max{\OP@qq@w}{\OP@b@w}
- \hbox{\ophline(-0.5,-0.25){\the\count@v.5}%
+ \op@count@v=\op@max{\OP@qq@w}{\OP@b@w}
+ \hbox{\ophline(-0.5,-0.25){\the\op@count@v.5}%
\op@display{operandstyle.2}{b}%
\ifnum\op@shift=0\relax\else
- \count@v=\op@shift
- \advance\count@v by\OP@b@d
- \oplput(-\the\count@v,0){\op@strikedecimalsepsymbol}%
+ \op@count@v=\op@shift
+ \advance\op@count@v by\OP@b@d
+ \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}%
\fi}
\hbox{\op@display{resultstyle}{qq}}
}%
@@ -2357,10 +2430,14 @@
\def\op@divmode{#1}%
\op@copy{#2}{da}%
\op@copy{#3}{db}%
- \count@iv=0
- \count@iii=\op@max{\OP@da@d}{\OP@db@d}\relax
- \op@powten{da}{\the\count@iii}%
- \op@powten{db}{\the\count@iii}%
+ \op@count@iv=0
+ \op@count@iii=\op@max{\OP@da@d}{\OP@db@d}\relax
+ \op@powten{da}{\the\op@count@iii}%
+ \op@powten{db}{\the\op@count@iii}%
+% add 0.23
+ \op@unzero{da}%
+ \op@unzero{db}%
+% end 0.23
\ifnum\op@divmode=1
\op@cmp{da}{maxinteger}%
\ifopgt
@@ -2387,29 +2464,29 @@
\fi\fi
\fi
\op@multable{db}%
+ \op@copy{da}{R}%
\op@cmp{da}{db}%
\ifople
- \op@copy{da}{R}%
- \count@i=\OP@da@w
+ \op@count@i=\OP@da@w
\else
\xdef\OP@R@d{0}%
\xdef\OP@R@s{0}%
- \count@i=\@nameuse{OP@db@w}%
- \op@leftdividend{\the\count@i}%
+ \op@count@i=\@nameuse{OP@db@w}%
+ \op@leftdividend{\the\op@count@i}%
\op@cmp{R}{db}%
\ifoplt
- \ifnum\OP@da@w>\count@i
- \advance\count@i by1
- \op@leftdividend{\the\count@i}%
+ \ifnum\OP@da@w>\op@count@i
+ \advance\op@count@i by1
+ \op@leftdividend{\the\op@count@i}%
\fi
\fi
\fi
- \xdef\op@firstlength{\the\count@i}%
- \count@i=-\count@i
- \advance\count@i by\OP@da@w
+ \xdef\op@firstlength{\the\op@count@i}%
+ \op@count@i=-\op@count@i
+ \advance\op@count@i by\OP@da@w
\op@copy{R}{R0}%
\op@copy{zero}{dq}%
- \count@ii=0
+ \op@count@ii=0
\op@againtrue
\loop
\ifop@again
@@ -2419,96 +2496,96 @@
\op@sub{R}{T\op@k}{dr}%
\op@unzero{T\op@k}%
\op@multen{dr}%
- \ifnum\count@i>0
- \@namexdef{OP@dr@1}{\@nameuse{OP@da@\the\count@i}}%
+ \ifnum\op@count@i>0
+ \@namexdef{OP@dr@1}{\@nameuse{OP@da@\the\op@count@i}}%
\fi
- \advance\count@i by-1\relax
+ \advance\op@count@i by-1\relax
\op@unzero{dr}%
\ifnum\OP@dr@w=1
\xdef\OP@dr@w{2}%
\xdef\OP@dr@i{2}%
\@namexdef{OP@dr@2}{0}%
\fi
- \advance\count@ii by1\relax
- \op@copy{dr}{R\the\count@ii}%
+ \advance\op@count@ii by1\relax
+ \op@copy{dr}{R\the\op@count@ii}%
\op@copy{dr}{R}%
\ifcase\op@divmode\relax
- \ifnum\count@ii<\op@maxdivstep\relax\else
+ \ifnum\op@count@ii<\op@maxdivstep\relax\else
\op@againfalse
\fi
- \ifnum\count@i<0\relax%
+ \ifnum\op@count@i<0\relax%
\op@cmp{zero}{R}%
\ifopeq
\op@againfalse
\fi
\fi
\or
- \ifnum\count@ii<\op@safedivstep\relax\else
+ \ifnum\op@count@ii<\op@safedivstep\relax\else
\op@againfalse
\fi
- \ifnum\count@i<-\op@lengthperiod\relax
- \count@iv=\count@ii
- \advance\count@iv by-\op@lengthperiod
- \op@cmp{R\the\count@iv}{R\the\count@ii}%
+ \ifnum\op@count@i<-\op@lengthperiod\relax
+ \op@count@iv=\op@count@ii
+ \advance\op@count@iv by-\op@lengthperiod
+ \op@cmp{R\the\op@count@iv}{R\the\op@count@ii}%
\ifopeq
\op@againfalse
\fi
\fi
\or
- \ifnum\count@i=-1
+ \ifnum\op@count@i=-1
\op@againfalse
\fi
\fi
\repeat
\op@copy{zero}{T0}%
- \advance\count@i by1\relax
- \ifnum\count@i<0
- \xdef\OP@dq@d{-\the\count@i}%
- \count@z=\OP@dq@w
- \advance\count@z by\count@i
- \xdef\OP@dq@i{\the\count@z}%
+ \advance\op@count@i by1\relax
+ \ifnum\op@count@i<0
+ \xdef\OP@dq@d{-\the\op@count@i}%
+ \op@count@z=\OP@dq@w
+ \advance\op@count@z by\op@count@i
+ \xdef\OP@dq@i{\the\op@count@z}%
\fi
\op@unzero{dq}%
\op@copy{dq}{#4}%
\op@unzero{dr}%
\op@copy{dr}{R}%
\op@rshift{1}{dr}%
- \op@copy{dr}{R\the\count@ii}%
- \count@i=\count@iii
- \advance\count@i by1
- \advance\count@i by\OP@dq@d\relax
- \count@ii=\count@i
- \advance\count@ii by\OP@R@w
- \op@format{\the\count@ii}{0}{R}%
- \count@z=\OP@R@w
- \advance\count@z by-\count@i
- \xdef\OP@R@i{\the\count@z}%
- \xdef\OP@R@d{\the\count@i}%
+ \op@copy{dr}{R\the\op@count@ii}%
+ \op@count@i=\op@count@iii
+ \advance\op@count@i by1
+ \advance\op@count@i by\OP@dq@d\relax
+ \op@count@ii=\op@count@i
+ \advance\op@count@ii by\OP@R@w
+ \op@format{\the\op@count@ii}{0}{R}%
+ \op@count@z=\OP@R@w
+ \advance\op@count@z by-\op@count@i
+ \xdef\OP@R@i{\the\op@count@z}%
+ \xdef\OP@R@d{\the\op@count@i}%
\op@unzero{R}%
\op@copy{R}{#5}%
\endgroup
}
\def\op@powten#1#2{%
\begingroup
- \count@z=#2\relax
- \advance\count@z by-\@nameuse{OP@#1@d}%
+ \op@count@z=#2\relax
+ \advance\op@count@z by-\@nameuse{OP@#1@d}%
\@namexdef{OP@#1@d}{0}%
- \count@i=\@nameuse{OP@#1@w}%
- \advance\count@i by\count@z
- \@namexdef{OP@#1@w}{\the\count@i}%
- \@namexdef{OP@#1@i}{\the\count@i}%
- \count@ii=\count@i
- \advance\count@ii by-\count@z
+ \op@count@i=\@nameuse{OP@#1@w}%
+ \advance\op@count@i by\op@count@z
+ \@namexdef{OP@#1@w}{\the\op@count@i}%
+ \@namexdef{OP@#1@i}{\the\op@count@i}%
+ \op@count@ii=\op@count@i
+ \advance\op@count@ii by-\op@count@z
\loop
- \ifnum\count@ii>0
- \@namexdef{OP@#1@\the\count@i}{\@nameuse{OP@#1@\the\count@ii}}%
- \advance\count@i by-1
- \advance\count@ii by-1
+ \ifnum\op@count@ii>0
+ \@namexdef{OP@#1@\the\op@count@i}{\@nameuse{OP@#1@\the\op@count@ii}}%
+ \advance\op@count@i by-1
+ \advance\op@count@ii by-1
\repeat
\loop
- \ifnum\count@i>0
- \@namexdef{OP@#1@\the\count@i}{0}%
- \advance\count@i by-1
+ \ifnum\op@count@i>0
+ \@namexdef{OP@#1@\the\op@count@i}{0}%
+ \advance\op@count@i by-1
\repeat
\endgroup
}
@@ -2558,15 +2635,15 @@
}
\def\op@divperiod#1#2#3{%
\begingroup
- \count@i=#1\relax
- \count@ii=#2\relax
- \ifnum\count@ii=0\relax
+ \op@count@i=#1\relax
+ \op@count@ii=#2\relax
+ \ifnum\op@count@ii=0\relax
\@namexdef{#3}{1}%
\else
- \op@gcd{\the\count@i}{\the\count@ii}{op@tmp}%
- \count@iii=\op@tmp
- \divide\count@ii by\count@iii
- \op@twofiveQ{\the\count@ii}{op@tmp}%
+ \op@gcd{\the\op@count@i}{\the\op@count@ii}{op@tmp}%
+ \op@count@iii=\op@tmp
+ \divide\op@count@ii by\op@count@iii
+ \op@twofiveQ{\the\op@count@ii}{op@tmp}%
\op@order{\op@tmp}{op@tmp}%
\@namexdef{#3}{\op@tmp}%
\fi
@@ -2616,83 +2693,83 @@
}
\def\op@gcd#1#2#3{%
\begingroup
- \count@i=#1\relax
- \count@ii=#2\relax
+ \op@count@i=#1\relax
+ \op@count@ii=#2\relax
\loop
- \count@iii=\count@i
- \divide\count@iii by\count@ii
- \multiply\count@iii by\count@ii
- \advance\count@i by-\count@iii
- \count@iii=\count@i\relax
- \count@i=\count@ii\relax
- \count@ii=\count@iii
- \ifnum\count@ii>0
+ \op@count@iii=\op@count@i
+ \divide\op@count@iii by\op@count@ii
+ \multiply\op@count@iii by\op@count@ii
+ \advance\op@count@i by-\op@count@iii
+ \op@count@iii=\op@count@i\relax
+ \op@count@i=\op@count@ii\relax
+ \op@count@ii=\op@count@iii
+ \ifnum\op@count@ii>0
\repeat
- \@namexdef{#3}{\the\count@i}%
+ \@namexdef{#3}{\the\op@count@i}%
\endgroup
}
\def\op@twofiveQ#1#2{%
\begingroup
- \count@i=#1\relax
+ \op@count@i=#1\relax
\loop
- \count@ii=\count@i
- \divide\count@ii by2
- \multiply\count@ii by2
- \ifnum\count@ii=\count@i
- \divide\count@i by2
+ \op@count@ii=\op@count@i
+ \divide\op@count@ii by2
+ \multiply\op@count@ii by2
+ \ifnum\op@count@ii=\op@count@i
+ \divide\op@count@i by2
\repeat
\loop
- \count@ii=\count@i
- \divide\count@ii by5
- \multiply\count@ii by5
- \ifnum\count@ii=\count@i
- \divide\count@i by5
+ \op@count@ii=\op@count@i
+ \divide\op@count@ii by5
+ \multiply\op@count@ii by5
+ \ifnum\op@count@ii=\op@count@i
+ \divide\op@count@i by5
\repeat
- \@namexdef{#2}{\the\count@i}%
+ \@namexdef{#2}{\the\op@count@i}%
\endgroup
}
\def\op@order#1#2{%
\begingroup
- \count@i=1\relax
- \count@ii=0
+ \op@count@i=1\relax
+ \op@count@ii=0
\loop
- \multiply\count@i by10
- \count@iii=\count@i
- \divide\count@iii by#1\relax
- \multiply\count@iii by#1\relax
- \advance\count@i by-\count@iii
- \advance\count@ii by1
- \ifnum\count@i>1
+ \multiply\op@count@i by10
+ \op@count@iii=\op@count@i
+ \divide\op@count@iii by#1\relax
+ \multiply\op@count@iii by#1\relax
+ \advance\op@count@i by-\op@count@iii
+ \advance\op@count@ii by1
+ \ifnum\op@count@i>1
\repeat
- \@namexdef{#2}{\the\count@ii}
+ \@namexdef{#2}{\the\op@count@ii}
\endgroup
}
\def\op@leftdividend#1{%
\begingroup
- \count@z=#1\relax
- \count@i=\OP@da@w
- \xdef\OP@R@w{\the\count@z}%
- \xdef\OP@R@i{\the\count@z}%
+ \op@count@z=#1\relax
+ \op@count@i=\OP@da@w
+ \xdef\OP@R@w{\the\op@count@z}%
+ \xdef\OP@R@i{\the\op@count@z}%
\loop
- \@namexdef{OP@R@\the\count@z}{\@nameuse{OP@da@\the\count@i}}%
- \advance\count@i by-1
- \advance\count@z by-1
- \ifnum\count@z>0
+ \@namexdef{OP@R@\the\op@count@z}{\@nameuse{OP@da@\the\op@count@i}}%
+ \advance\op@count@i by-1
+ \advance\op@count@z by-1
+ \ifnum\op@count@z>0
\repeat
\endgroup
}
\def\op@multen#1{%
\begingroup
- \count@z=\@nameuse{OP@#1@w}\relax
- \count@i=\count@z
- \advance\count@i by1
- \@namexdef{OP@#1@w}{\the\count@i}%
- \@namexdef{OP@#1@i}{\the\count@i}%
+ \op@count@z=\@nameuse{OP@#1@w}\relax
+ \op@count@i=\op@count@z
+ \advance\op@count@i by1
+ \@namexdef{OP@#1@w}{\the\op@count@i}%
+ \@namexdef{OP@#1@i}{\the\op@count@i}%
\loop
- \ifnum\count@z>0
- \@namexdef{OP@#1@\the\count@i}{\@nameuse{OP@#1@\the\count@z}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#1@\the\op@count@i}{\@nameuse{OP@#1@\the\op@count@z}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
\@namexdef{OP@#1@1}{0}%
\endgroup
@@ -2700,32 +2777,32 @@
\def\op@mulpowerten#1#2{%
\begingroup
\ifnum\@nameuse{OP@#1@d}<#2\relax
- \count@z=#2\relax
- \advance\count@z by-\@nameuse{OP@#1@d}\relax
- \count@ii=\@nameuse{OP@#1@w}%
- \count@i=\@nameuse{OP@#1@w}%
- \advance\count@i by\count@z
- \@namexdef{OP@#1@w}{\the\count@i}%
- \@namexdef{OP@#1@i}{\the\count@i}%
+ \op@count@z=#2\relax
+ \advance\op@count@z by-\@nameuse{OP@#1@d}\relax
+ \op@count@ii=\@nameuse{OP@#1@w}%
+ \op@count@i=\@nameuse{OP@#1@w}%
+ \advance\op@count@i by\op@count@z
+ \@namexdef{OP@#1@w}{\the\op@count@i}%
+ \@namexdef{OP@#1@i}{\the\op@count@i}%
\@namexdef{OP@#1@d}{0}%
\loop
- \ifnum\count@ii>0
- \@namexdef{OP@#1@\the\count@i}{\@nameuse{OP@#1@\the\count@ii}}%
- \advance\count@i by-1
- \advance\count@ii by-1
+ \ifnum\op@count@ii>0
+ \@namexdef{OP@#1@\the\op@count@i}{\@nameuse{OP@#1@\the\op@count@ii}}%
+ \advance\op@count@i by-1
+ \advance\op@count@ii by-1
\repeat
\loop
- \ifnum\count@z>0
- \@namexdef{OP@#1@\the\count@z}{0}%
- \advance\count@z by-1\relax
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#1@\the\op@count@z}{0}%
+ \advance\op@count@z by-1\relax
\repeat
\else
- \count@z=\@nameuse{OP@#1@d}\relax
- \advance\count@z by-#2\relax
- \@namexdef{OP@#1@d}{\the\count@z}%
- \count@z=\@nameuse{OP@#1@i}\relax
- \advance\count@z by#2\relax
- \@namexdef{OP@#1@i}{\the\count@z}%
+ \op@count@z=\@nameuse{OP@#1@d}\relax
+ \advance\op@count@z by-#2\relax
+ \@namexdef{OP@#1@d}{\the\op@count@z}%
+ \op@count@z=\@nameuse{OP@#1@i}\relax
+ \advance\op@count@z by#2\relax
+ \@namexdef{OP@#1@i}{\the\op@count@z}%
\fi
\op@unzero{#1}%
\endgroup
@@ -2733,25 +2810,25 @@
\def\op@divpowerten#1#2{%
\begingroup
\ifnum\@nameuse{OP@#1@i}>#2\relax
- \count@z=\@nameuse{OP@#1@d}\relax
- \advance\count@z by#2\relax
- \@namexdef{OP@#1@d}{\the\count@z}%
- \count@z=\@nameuse{OP@#1@i}\relax
- \advance\count@z by-#2\relax
- \@namexdef{OP@#1@i}{\the\count@z}%
+ \op@count@z=\@nameuse{OP@#1@d}\relax
+ \advance\op@count@z by#2\relax
+ \@namexdef{OP@#1@d}{\the\op@count@z}%
+ \op@count@z=\@nameuse{OP@#1@i}\relax
+ \advance\op@count@z by-#2\relax
+ \@namexdef{OP@#1@i}{\the\op@count@z}%
\else
- \count@z=\@nameuse{OP@#1@d}\relax
- \advance\count@z by#2\relax
- \@namexdef{OP@#1@d}{\the\count@z}%
+ \op@count@z=\@nameuse{OP@#1@d}\relax
+ \advance\op@count@z by#2\relax
+ \@namexdef{OP@#1@d}{\the\op@count@z}%
\@namexdef{OP@#1@i}{1}%
- \advance\count@z by1\relax
- \count@i=\@nameuse{OP@#1@w}%
- \@namexdef{OP@#1@w}{\the\count@z}%
- \advance\count@z by1
+ \advance\op@count@z by1\relax
+ \op@count@i=\@nameuse{OP@#1@w}%
+ \@namexdef{OP@#1@w}{\the\op@count@z}%
+ \advance\op@count@z by1
\loop
- \ifnum\count@i<\count@z
- \advance\count@i by1
- \@namexdef{OP@#1@\the\count@i}{0}%
+ \ifnum\op@count@i<\op@count@z
+ \advance\op@count@i by1
+ \@namexdef{OP@#1@\the\op@count@i}{0}%
\repeat
\fi
\op@unzero{#1}%
@@ -2823,17 +2900,17 @@
\def\op@integer#1#2{%
\begingroup
\op@unzero{#1}%
- \count@z=\@nameuse{OP@#1@d}\relax
- \ifnum\count@z>0\relax
- \count@i=0
+ \op@count@z=\@nameuse{OP@#1@d}\relax
+ \ifnum\op@count@z>0\relax
+ \op@count@i=0
\loop
- \ifnum\count@z<\@nameuse{OP@#1@w}%
- \advance\count@z by1\relax
- \advance\count@i by1\relax
- \@namexdef{OP@#2@\the\count@i}{\@nameuse{OP@#1@\the\count@z}}%
+ \ifnum\op@count@z<\@nameuse{OP@#1@w}%
+ \advance\op@count@z by1\relax
+ \advance\op@count@i by1\relax
+ \@namexdef{OP@#2@\the\op@count@i}{\@nameuse{OP@#1@\the\op@count@z}}%
\repeat
- \@namexdef{OP@#2@w}{\the\count@i}%
- \@namexdef{OP@#2@i}{\the\count@i}%
+ \@namexdef{OP@#2@w}{\the\op@count@i}%
+ \@namexdef{OP@#2@i}{\the\op@count@i}%
\@namexdef{OP@#2@d}{0}%
\else
\op@copy{#1}{#2}%
@@ -2888,17 +2965,17 @@
\op@unsplit{b}{@b}%
\@namexdef{OP@a@#2}{\Op@@b}%
\ifnum\OP@a@w<#2\relax
- \count@z=\OP@a@w\relax
- \advance\count@z by1\relax
+ \op@count@z=\OP@a@w\relax
+ \advance\op@count@z by1\relax
\loop
- \ifnum\count@z<#2\relax
- \@namexdef{OP@a@\the\count@z}{0}%
- \advance\count@z by1
+ \ifnum\op@count@z<#2\relax
+ \@namexdef{OP@a@\the\op@count@z}{0}%
+ \advance\op@count@z by1
\repeat
\xdef\OP@a@w{#2}%
- \count@z=#2\relax
- \advance\count@z by-\OP@a@d
- \xdef\OP@a@i{\the\count@z}%
+ \op@count@z=#2\relax
+ \advance\op@count@z by-\OP@a@d
+ \xdef\OP@a@i{\the\op@count@z}%
\fi
\op@unsplit{a}{#1}%
\fi
@@ -2910,10 +2987,10 @@
\ifop@error
\op@errorwrite
\else
- \count@z=\OP@a@d
- \advance\count@z by#2\relax
- \ifnum\OP@a@w>\count@z\relax
- \@namexdef{Op@#3}{\@nameuse{OP@a@\the\count@z}}%
+ \op@count@z=\OP@a@d
+ \advance\op@count@z by#2\relax
+ \ifnum\OP@a@w>\op@count@z\relax
+ \@namexdef{Op@#3}{\@nameuse{OP@a@\the\op@count@z}}%
\else
\@namexdef{Op@#3}{0}%
\fi
@@ -2928,20 +3005,20 @@
\op@errorwrite
\else
\op@unsplit{b}{@b}%
- \count@z=\OP@a@d
- \advance\count@z by#2\relax
- \@namexdef{OP@a@\the\count@z}{\Op@@b}%
- \ifnum\OP@a@w>\count@z\relax\else
- \count@i=\OP@a@w
- \xdef\OP@a@w{\the\count@z}%
- \advance\count@i by1
+ \op@count@z=\OP@a@d
+ \advance\op@count@z by#2\relax
+ \@namexdef{OP@a@\the\op@count@z}{\Op@@b}%
+ \ifnum\OP@a@w>\op@count@z\relax\else
+ \op@count@i=\OP@a@w
+ \xdef\OP@a@w{\the\op@count@z}%
+ \advance\op@count@i by1
\loop
- \ifnum\count@i<\count@z
- \@namexdef{OP@a@\the\count@i}{0}%
- \advance\count@i by1
+ \ifnum\op@count@i<\op@count@z
+ \@namexdef{OP@a@\the\op@count@i}{0}%
+ \advance\op@count@i by1
\repeat
- \advance\count@z by-\OP@a@d
- \xdef\OP@a@i{\the\count@z}%
+ \advance\op@count@z by-\OP@a@d
+ \xdef\OP@a@i{\the\op@count@z}%
\fi
\op@unsplit{a}{#1}%
\fi
@@ -2956,10 +3033,10 @@
\ifnum\OP@a@d<#2\relax
\@namexdef{Op@#3}{0}%
\else
- \count@z=\OP@a@d
- \advance\count@z by-#2\relax
- \advance\count@z by1
- \@namexdef{Op@#3}{\@nameuse{OP@a@\the\count@z}}%
+ \op@count@z=\OP@a@d
+ \advance\op@count@z by-#2\relax
+ \advance\op@count@z by1
+ \@namexdef{Op@#3}{\@nameuse{OP@a@\the\op@count@z}}%
\fi
\fi
\endgroup
@@ -2973,31 +3050,42 @@
\else
\op@unsplit{b}{@b}%
\ifnum\OP@a@d<\Op@@b\relax
- \count@z=\Op@@b
- \advance\count@z by-\OP@a@d
- \advance\count@z by1\relax
- \count@i=\OP@a@w
- \advance\count@i by\count@z\relax
- \count@z=\OP@a@w
- \xdef\OP@a@w{\the\count@i}%
+ \op@count@z=\Op@@b
+ \advance\op@count@z by-\OP@a@d
+%%% [2006/10/06] Bug find by Dave Jarvis.
+% \advance\op@count@z by1\relax
+%%% end bug fixing
+ \op@count@i=\OP@a@w
+ \advance\op@count@i by\op@count@z\relax
+ \op@count@z=\OP@a@w
+ \xdef\OP@a@w{\the\op@count@i}%
\xdef\OP@a@d{\Op@@b}%
\loop
- \ifnum\count@z>0
- \@namexdef{OP@a@\the\count@i}{\@nameuse{OP@a@\the\count@z}}%
- \advance\count@z by-1
- \advance\count@i by-1
+ \ifnum\op@count@z>0
+ \@namexdef{OP@a@\the\op@count@i}{\@nameuse{OP@a@\the\op@count@z}}%
+ \advance\op@count@z by-1
+ \advance\op@count@i by-1
\repeat
\loop
- \ifnum\count@i>1
- \@namexdef{OP@a@\the\count@i}{0}%
- \advance\count@i by-1
+ \ifnum\op@count@i>1
+ \@namexdef{OP@a@\the\op@count@i}{0}%
+ \advance\op@count@i by-1
\repeat
- \@namexdef{OP@a@1}{\Op@@b}%
+%%% [2006/10/06] Bug find by Dave Jarvis.
+% \@namexdef{OP@a@1}{\Op@@b}%
+ \@namexdef{OP@a@1}{#2}%
+%%% end bug fixing
\else
- \count@z=\OP@a@d
- \advance\count@z by-#2\relax
- \advance\count@z by1
- \@namexdef{OP@a@\the\count@z}{\Op@@b}%
+ \op@count@z=\OP@a@d
+%%% [2006/10/06] Bug find by Dave Jarvis.
+% \advance\op@count@z by-#2\relax
+ \advance\op@count@z by-\Op@@b\relax
+%%% end bug fixing
+ \advance\op@count@z by1
+%%% [2006/10/06] Bug find by Dave Jarvis.
+% \@namexdef{OP@a@\the\op@count@z}{\Op@@b}%
+ \@namexdef{OP@a@\the\op@count@z}{#2}%
+%%% end bug fixing
\fi
\op@unsplit{a}{#1}%
\fi
@@ -3009,17 +3097,17 @@
\ifop@error
\op@errorwrite
\else
- \count@z=\OP@a@w\relax
- \count@i=0\relax
+ \op@count@z=\OP@a@w\relax
+ \op@count@i=0\relax
\loop
- \ifnum\count@z>0
- \advance\count@i by\@nameuse{OP@a@\the\count@z}\relax
- \ifnum\count@i>8
- \advance\count@i by-9
+ \ifnum\op@count@z>0
+ \advance\op@count@i by\@nameuse{OP@a@\the\op@count@z}\relax
+ \ifnum\op@count@i>8
+ \advance\op@count@i by-9
\fi
- \advance\count@z by-1
+ \advance\op@count@z by-1
\repeat
- \opcopy{\the\count@i}{#2}%
+ \opcopy{\the\op@count@i}{#2}%
\fi
\endgroup
}
@@ -3029,28 +3117,28 @@
\ifop@error
\op@errorwrite
\else
- \count@ii=\OP@a@w
- \advance\count@ii by1\relax
- \count@i=0\relax
- \count@z=-1\relax
+ \op@count@ii=\OP@a@w
+ \advance\op@count@ii by1\relax
+ \op@count@i=0\relax
+ \op@count@z=-1\relax
\loop
- \advance\count@z by2\relax
- \ifnum\count@z<\count@ii
- \advance\count@i by\@nameuse{OP@a@\the\count@z}\relax
- \ifnum\count@i>10
- \advance\count@i by-11
+ \advance\op@count@z by2\relax
+ \ifnum\op@count@z<\op@count@ii
+ \advance\op@count@i by\@nameuse{OP@a@\the\op@count@z}\relax
+ \ifnum\op@count@i>10
+ \advance\op@count@i by-11
\fi
\repeat
- \count@z=0\relax
+ \op@count@z=0\relax
\loop
- \advance\count@z by2\relax
- \ifnum\count@z<\count@ii
- \advance\count@i by-\@nameuse{OP@a@\the\count@z}\relax
- \ifnum\count@i<0
- \advance\count@i by11
+ \advance\op@count@z by2\relax
+ \ifnum\op@count@z<\op@count@ii
+ \advance\op@count@i by-\@nameuse{OP@a@\the\op@count@z}\relax
+ \ifnum\op@count@i<0
+ \advance\op@count@i by11
\fi
\repeat
- \opcopy{\the\count@i}{#2}%
+ \opcopy{\the\op@count@i}{#2}%
\fi
\endgroup
}
@@ -3075,9 +3163,9 @@
\op@againtrue
\fi\fi\fi
\ifop@again
- \count@z=1
- \advance\count@z by-\@nameuse{OP@#2@s}\relax
- \@namexdef{OP@#2@s}{\the\count@z}%
+ \op@count@z=1
+ \advance\op@count@z by-\@nameuse{OP@#2@s}\relax
+ \@namexdef{OP@#2@s}{\the\op@count@z}%
\fi
\endgroup
}
@@ -3126,30 +3214,30 @@
\op@error{Exponent is too big (>1073741824)}%
{Sorry}%
\else
- \count@z=0
+ \op@count@z=0
\@namexdef{Op@@e0}{1}%
\xdef\Op@@tmp{1}%
\@namexdef{Op@@p0}{\Op@@a}%
\@namexdef{Op@@ptmp}{\@nameuse{Op@@p0}}%
\loop
- \ifnum\@nameuse{Op@@e\the\count@z}<\Op@@b
+ \ifnum\@nameuse{Op@@e\the\op@count@z}<\Op@@b
\opadd*{@tmp}{@tmp}{@@tmp}%
\opmul*{@ptmp}{@ptmp}{@@ptmp}%
- \advance\count@z by1
+ \advance\op@count@z by1
\xdef\Op@@tmp{\Op@@@tmp}%
\xdef\Op@@ptmp{\Op@@@ptmp}%
- \@namexdef{Op@@e\the\count@z}{\Op@@@tmp}%
- \@namexdef{Op@@p\the\count@z}{\Op@@@ptmp}%
+ \@namexdef{Op@@e\the\op@count@z}{\Op@@@tmp}%
+ \@namexdef{Op@@p\the\op@count@z}{\Op@@@ptmp}%
\repeat
\opcopy{1}{@r}%
\loop
\ifnum\Op@@b>0\relax
- \ifnum\Op@@b<\@nameuse{Op@@e\the\count@z}\relax
+ \ifnum\Op@@b<\@nameuse{Op@@e\the\op@count@z}\relax
\else
- \opmul*{@r}{@p\the\count@z}{@r}%
- \opsub*{@b}{@e\the\count@z}{@b}%
+ \opmul*{@r}{@p\the\op@count@z}{@r}%
+ \opsub*{@b}{@e\the\op@count@z}{@b}%
\fi
- \advance\count@z by-1
+ \advance\op@count@z by-1
\repeat
\opcopy{@r}{#3}%
\fi
@@ -3187,9 +3275,9 @@
\opneg{@rb}{@rb}%
\ifnum\Op@@rb<\@nameuse{OP@ra@i}\relax
\else
- \count@z=\@nameuse{OP@ra@i}%
- \advance\count@z by-1
- \xdef\Op@@rb{\the\count@z}%
+ \op@count@z=\@nameuse{OP@ra@i}%
+ \advance\op@count@z by-1
+ \xdef\Op@@rb{\the\op@count@z}%
\fi
\opneg{@rb}{@rb}%
\fi
@@ -3226,56 +3314,56 @@
\begingroup
\op@unsplit{#2}{@fb}%
\op@unzero{#1}%
- \count@z=\Op@@fb\relax
- \ifnum\count@z<0
- \count@z=-\count@z
- \ifnum\count@z<\@nameuse{OP@#1@i}\relax\else
- \count@z=\@nameuse{OP@#1@i}%
- \advance\count@z by-1
+ \op@count@z=\Op@@fb\relax
+ \ifnum\op@count@z<0
+ \op@count@z=-\op@count@z
+ \ifnum\op@count@z<\@nameuse{OP@#1@i}\relax\else
+ \op@count@z=\@nameuse{OP@#1@i}%
+ \advance\op@count@z by-1
\fi
\op@integer{#1}{#1}%
\loop
- \ifnum\count@z>0
- \@namexdef{OP@#1@\the\count@z}{0}%
- \advance\count@z by-1\relax
+ \ifnum\op@count@z>0
+ \@namexdef{OP@#1@\the\op@count@z}{0}%
+ \advance\op@count@z by-1\relax
\repeat
\else
- \ifnum\count@z>\@nameuse{OP@#1@d}%
- \advance\count@z by-\@nameuse{OP@#1@d}%
- \count@i=\@nameuse{OP@#1@d}%
- \advance\count@i by\count@z
- \@namexdef{OP@#1@d}{\the\count@i}%
- \count@i=\@nameuse{OP@#1@w}\relax
- \count@ii=\count@i
- \advance\count@ii by\count@z
- \@namexdef{OP@#1@w}{\the\count@ii}%
+ \ifnum\op@count@z>\@nameuse{OP@#1@d}%
+ \advance\op@count@z by-\@nameuse{OP@#1@d}%
+ \op@count@i=\@nameuse{OP@#1@d}%
+ \advance\op@count@i by\op@count@z
+ \@namexdef{OP@#1@d}{\the\op@count@i}%
+ \op@count@i=\@nameuse{OP@#1@w}\relax
+ \op@count@ii=\op@count@i
+ \advance\op@count@ii by\op@count@z
+ \@namexdef{OP@#1@w}{\the\op@count@ii}%
\loop
- \ifnum\count@i>0
- \@namexdef{OP@#1@\the\count@ii}{\@nameuse{OP@#1@\the\count@i}}%
- \advance\count@i by-1
- \advance\count@ii by-1
+ \ifnum\op@count@i>0
+ \@namexdef{OP@#1@\the\op@count@ii}{\@nameuse{OP@#1@\the\op@count@i}}%
+ \advance\op@count@i by-1
+ \advance\op@count@ii by-1
\repeat
\loop
- \ifnum\count@ii>0
- \@namexdef{OP@#1@\the\count@ii}{0}%
- \advance\count@ii by-1
+ \ifnum\op@count@ii>0
+ \@namexdef{OP@#1@\the\op@count@ii}{0}%
+ \advance\op@count@ii by-1
\repeat
\else
- \advance\count@z by-\@nameuse{OP@#1@d}\relax
- \count@z=-\count@z\relax
- \count@i=\@nameuse{OP@#1@w}\relax
- \count@ii=\count@i\relax
- \advance\count@i by-\count@z
- \@namexdef{OP@#1@w}{\the\count@i}\relax
- \count@i=\@nameuse{OP@#1@d}\relax
- \advance\count@i by-\count@z
- \@namexdef{OP@#1@d}{\the\count@i}%
- \count@i=0\relax
+ \advance\op@count@z by-\@nameuse{OP@#1@d}\relax
+ \op@count@z=-\op@count@z\relax
+ \op@count@i=\@nameuse{OP@#1@w}\relax
+ \op@count@ii=\op@count@i\relax
+ \advance\op@count@i by-\op@count@z
+ \@namexdef{OP@#1@w}{\the\op@count@i}\relax
+ \op@count@i=\@nameuse{OP@#1@d}\relax
+ \advance\op@count@i by-\op@count@z
+ \@namexdef{OP@#1@d}{\the\op@count@i}%
+ \op@count@i=0\relax
\loop
- \ifnum\count@z<\count@ii
- \advance\count@z by1\relax
- \advance\count@i by1
- \@namexdef{OP@#1@\the\count@i}{\@nameuse{OP@#1@\the\count@z}}%
+ \ifnum\op@count@z<\op@count@ii
+ \advance\op@count@z by1\relax
+ \advance\op@count@i by1
+ \@namexdef{OP@#1@\the\op@count@i}{\@nameuse{OP@#1@\the\op@count@z}}%
\repeat
\fi
\fi
@@ -3285,10 +3373,10 @@
\op@unsplit{#1}{@Ca}%
\op@unsplit{#2}{@Cb}%
\op@unzero{#1}%
- \count@z=\Op@@Cb\relax
- \ifnum\count@z>0\relax
- \ifnum\count@z<\@nameuse{OP@#1@d}\relax
- \oppower{0.1}{\the\count@z}{@Cr}%
+ \op@count@z=\Op@@Cb\relax
+ \ifnum\op@count@z>0\relax
+ \ifnum\op@count@z<\@nameuse{OP@#1@d}\relax
+ \oppower{0.1}{\the\op@count@z}{@Cr}%
\opadd*{@Ca}{@Cr}{@Ca}%
\op@split{@Ca}{#1}%
\op@split{@Cb}{#2}%
@@ -3300,13 +3388,13 @@
\fi
\else
\opneg{@Cb}{@Cb}%
- \count@z=-\count@z\relax
- \ifnum\count@z<\@nameuse{OP@#1@i}\relax
- \oppower{10}{\the\count@z}{@Cr}%
+ \op@count@z=-\op@count@z\relax
+ \ifnum\op@count@z<\@nameuse{OP@#1@i}\relax
+ \oppower{10}{\the\op@count@z}{@Cr}%
\else
- \count@z=\@nameuse{OP@#1@i}%
- \advance\count@z by-1
- \oppower{10}{\the\count@z}{@Cr}%
+ \op@count@z=\@nameuse{OP@#1@i}%
+ \advance\op@count@z by-1
+ \oppower{10}{\the\op@count@z}{@Cr}%
\fi
\opadd*{@Ca}{@Cr}{@Ca}%
\opneg{@Cb}{@Cb}%
@@ -3387,8 +3475,8 @@
\catcode`\ =12
\op@scan@@line
}
-\def\op@scan@@line#1{\op@scan@@@line#1\@nil\endgroup}
-\def\op@scan@@@line#1#2\@nil{%
+\def\op@scan@@line#1{\op@scan@@@line#1\op@nil\endgroup}
+\def\op@scan@@@line#1#2\op@nil{%
\op@testch@r{#1}%
\ifop@isdigit
\global\op@in@signfalse
@@ -3482,293 +3570,293 @@
\else
\let\next\op@scan@@@line
\fi
- \expandafter\next\@tempa\@nil
+ \expandafter\next\@tempa\op@nil
}
\def\op@search@subexpr#1#2{%
\begingroup
- \count@i=#1\relax
- \count@v=#2\relax
- \ifnum\count@i=\count@v
+ \op@count@i=#1\relax
+ \op@count@v=#2\relax
+ \ifnum\op@count@i=\op@count@v
\op@token@use{#1}%
\else
- \count@iii=\count@v
- \count@iv=\count@i
- \advance\count@iv by-1
- \count@ii=0
+ \op@count@iii=\op@count@v
+ \op@count@iv=\op@count@i
+ \advance\op@count@iv by-1
+ \op@count@ii=0
\loop
- \ifnum\count@iii>\count@iv
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \ifnum\op@count@iii>\op@count@iv
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@rpar\relax
\advance\op@parenthesis by1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@lpar\relax
\advance\op@parenthesis by-1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@comma\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \advance\count@iii by-1
+ \advance\op@count@iii by-1
\repeat
- \ifnum\count@ii=0\relax
+ \ifnum\op@count@ii=0\relax
\ifnum\op@parenthesis=0
- \op@search@term{\the\count@i}{\the\count@v}%
+ \op@search@term{\the\op@count@i}{\the\op@count@v}%
\else
\op@error{Unbalanced parenthesis in expression}%
{Error between tokens #1 and #2}%
\fi
\else
- \advance\count@ii by-1
- \op@search@subexpr{\the\count@i}{\the\count@ii}%
- \advance\count@ii by2
- \op@search@subexpr{\the\count@ii}{\the\count@v}%
+ \advance\op@count@ii by-1
+ \op@search@subexpr{\the\op@count@i}{\the\op@count@ii}%
+ \advance\op@count@ii by2
+ \op@search@subexpr{\the\op@count@ii}{\the\op@count@v}%
\fi
\fi
\endgroup
}
\def\op@search@term#1#2{%
\begingroup
- \count@i=#1\relax
- \count@v=#2\relax
- \ifnum\count@i=\count@v
+ \op@count@i=#1\relax
+ \op@count@v=#2\relax
+ \ifnum\op@count@i=\op@count@v
\op@token@use{#1}%
\else
- \count@iii=\count@v
- \count@iv=\count@i
- \advance\count@iv by-1
- \count@ii=0\relax
+ \op@count@iii=\op@count@v
+ \op@count@iv=\op@count@i
+ \advance\op@count@iv by-1
+ \op@count@ii=0\relax
\loop
- \ifnum\count@iii>\count@iv\relax
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \ifnum\op@count@iii>\op@count@iv\relax
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@rpar\relax
\advance\op@parenthesis by1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@lpar\relax
\advance\op@parenthesis by-1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@add\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@sub\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \advance\count@iii by-1
+ \advance\op@count@iii by-1
\repeat
- \ifnum\count@ii=0\relax
+ \ifnum\op@count@ii=0\relax
\ifnum\op@parenthesis=0
- \op@search@factor{\the\count@i}{\the\count@v}%
+ \op@search@factor{\the\op@count@i}{\the\op@count@v}%
\else
\op@error{Unbalanced parenthesis in expression}%
{Error between tokens #1 and #2}%
\fi
\else
- \advance\count@ii by-1
- \op@search@term{\the\count@i}{\the\count@ii}%
- \advance\count@ii by2
- \op@search@term{\the\count@ii}{\the\count@v}%
- \advance\count@ii by-1
- \op@token@use{\the\count@ii}%
+ \advance\op@count@ii by-1
+ \op@search@term{\the\op@count@i}{\the\op@count@ii}%
+ \advance\op@count@ii by2
+ \op@search@term{\the\op@count@ii}{\the\op@count@v}%
+ \advance\op@count@ii by-1
+ \op@token@use{\the\op@count@ii}%
\fi
\fi
\endgroup
}
\def\op@search@factor#1#2{%
\begingroup
- \count@i=#1\relax
- \count@v=#2\relax
- \ifnum\count@i=\count@v
+ \op@count@i=#1\relax
+ \op@count@v=#2\relax
+ \ifnum\op@count@i=\op@count@v
\op@token@use{#1}%
\else
- \count@iii=\count@v
- \count@iv=\count@i
- \advance\count@iv by-1
- \count@ii=0
+ \op@count@iii=\op@count@v
+ \op@count@iv=\op@count@i
+ \advance\op@count@iv by-1
+ \op@count@ii=0
\loop
- \ifnum\count@iii>\count@iv
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \ifnum\op@count@iii>\op@count@iv
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@rpar\relax
\advance\op@parenthesis by1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@lpar\relax
\advance\op@parenthesis by-1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@mul\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@div\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@idiv\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \advance\count@iii by-1
+ \advance\op@count@iii by-1
\repeat
- \ifnum\count@ii=0\relax
+ \ifnum\op@count@ii=0\relax
\ifnum\op@parenthesis=0
- \op@search@power{\the\count@i}{\the\count@v}%
+ \op@search@power{\the\op@count@i}{\the\op@count@v}%
\else
\op@error{Unbalanced parenthesis in expression}%
{Error between tokens #1 and #2}%
\fi
\else
- \advance\count@ii by-1
- \op@search@factor{\the\count@i}{\the\count@ii}%
- \advance\count@ii by2
- \op@search@factor{\the\count@ii}{\the\count@v}%
- \advance\count@ii by-1
- \op@token@use{\the\count@ii}%
+ \advance\op@count@ii by-1
+ \op@search@factor{\the\op@count@i}{\the\op@count@ii}%
+ \advance\op@count@ii by2
+ \op@search@factor{\the\op@count@ii}{\the\op@count@v}%
+ \advance\op@count@ii by-1
+ \op@token@use{\the\op@count@ii}%
\fi
\fi
\endgroup
}
\def\op@search@power#1#2{%
\begingroup
- \count@i=#1\relax
- \count@v=#2\relax
- \ifnum\count@i=\count@v
+ \op@count@i=#1\relax
+ \op@count@v=#2\relax
+ \ifnum\op@count@i=\op@count@v
\op@token@use{#1}%
\else
- \count@iii=\count@v
- \count@iv=\count@i
- \advance\count@iv by-1
- \count@ii=0
+ \op@count@iii=\op@count@v
+ \op@count@iv=\op@count@i
+ \advance\op@count@iv by-1
+ \op@count@ii=0
\loop
- \ifnum\count@iii>\count@iv
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \ifnum\op@count@iii>\op@count@iv
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@rpar\relax
\advance\op@parenthesis by1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@lpar\relax
\advance\op@parenthesis by-1
\fi
- \expandafter\ifx\csname OP@token\the\count@iii\endcsname
+ \expandafter\ifx\csname OP@token\the\op@count@iii\endcsname
\op@string@power\relax
\ifnum\op@parenthesis=0
- \count@ii=\count@iii\relax
- \count@iii=0
+ \op@count@ii=\op@count@iii\relax
+ \op@count@iii=0
\fi
\fi
- \advance\count@iii by-1
+ \advance\op@count@iii by-1
\repeat
- \ifnum\count@ii=0\relax
+ \ifnum\op@count@ii=0\relax
\ifnum\op@parenthesis=0
- \op@search@primary{\the\count@i}{\the\count@v}%
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
\else
\op@error{Unbalanced parenthesis in expression}%
{Error between tokens #1 and #2}%
\fi
\else
- \advance\count@ii by-1
- \op@search@power{\the\count@i}{\the\count@ii}%
- \advance\count@ii by2
- \op@search@power{\the\count@ii}{\the\count@v}%
- \advance\count@ii by-1
- \op@token@use{\the\count@ii}%
+ \advance\op@count@ii by-1
+ \op@search@power{\the\op@count@i}{\the\op@count@ii}%
+ \advance\op@count@ii by2
+ \op@search@power{\the\op@count@ii}{\the\op@count@v}%
+ \advance\op@count@ii by-1
+ \op@token@use{\the\op@count@ii}%
\fi
\fi
\endgroup
}
\def\op@search@primary#1#2{%
\begingroup
- \count@i=#1\relax
- \count@v=#2\relax
- \ifnum\count@i=\count@v
+ \op@count@i=#1\relax
+ \op@count@v=#2\relax
+ \ifnum\op@count@i=\op@count@v
\op@token@use{#1}%
\else
\expandafter\ifx\csname OP@token#1\endcsname\op@string@abs
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@ceil
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@decimal
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@floor
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@integer
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@gcd
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@mod
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@neg
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@rest
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname\op@string@round
- \advance\count@i by1
- \op@search@primary{\the\count@i}{\the\count@v}%
- \advance\count@i by-1
- \op@token@use{\the\count@i}%
+ \advance\op@count@i by1
+ \op@search@primary{\the\op@count@i}{\the\op@count@v}%
+ \advance\op@count@i by-1
+ \op@token@use{\the\op@count@i}%
\fi
\expandafter\ifx\csname OP@token#1\endcsname
\op@string@lpar\relax
\expandafter\ifx\csname OP@token#2\endcsname
\op@string@rpar\relax
- \advance\count@i by1
- \advance\count@v by-1
- \op@search@subexpr{\the\count@i}{\the\count@v}%
+ \advance\op@count@i by1
+ \advance\op@count@v by-1
+ \op@search@subexpr{\the\op@count@i}{\the\op@count@v}%
\else
\op@error{Garbage after parenthesis}%
{Error between tokens #1 and #2}%
@@ -3905,32 +3993,32 @@
\op@isrparenthesisfalse
\op@isspacefalse
\op@isotherfalse
- \count255=`#1\relax
- \ifnum\count255=\op@plus \relax
+ \count@=`#1\relax
+ \ifnum\count@=\op@plus \relax
\op@isplustrue
- \else \ifnum\count255=\op@minus \relax
+ \else \ifnum\count@=\op@minus \relax
\op@isminustrue
- \else \ifnum\count255=\op@multiply \relax
+ \else \ifnum\count@=\op@multiply \relax
\op@ismultiplytrue
- \else \ifnum\count255=\op@divide \relax
+ \else \ifnum\count@=\op@divide \relax
\op@isdividetrue
- \else \ifnum\count255=\op@idivide \relax
+ \else \ifnum\count@=\op@idivide \relax
\op@isidividetrue
- \else \ifnum\count255=\op@pow \relax
+ \else \ifnum\count@=\op@pow \relax
\op@ispowertrue
- \else \ifnum\count255=\op@dot \relax
+ \else \ifnum\count@=\op@dot \relax
\op@isdottrue
- \else \ifnum\count255=\op@comma \relax
+ \else \ifnum\count@=\op@comma \relax
\op@iscommatrue
- \else \ifnum\count255=\op@lparenthesis \relax
+ \else \ifnum\count@=\op@lparenthesis \relax
\op@islparenthesistrue
- \else \ifnum\count255=\op@rparenthesis \relax
+ \else \ifnum\count@=\op@rparenthesis \relax
\op@isrparenthesistrue
- \else \ifnum\count255=\op@space \relax
+ \else \ifnum\count@=\op@space \relax
\op@isspacetrue
- \else \ifnum\count255<\op@numbegin \relax
+ \else \ifnum\count@<\op@numbegin \relax
\op@isothertrue
- \else \ifnum\count255>\op@numend \relax
+ \else \ifnum\count@>\op@numend \relax
\op@isothertrue
\else \op@isdigittrue
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi