summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-08 22:20:53 +0000
committerKarl Berry <karl@freefriends.org>2017-01-08 22:20:53 +0000
commit2fe97cec533b012f5030d9674055e5ef35b77e38 (patch)
treefd3b949c321850e7041ad808839f52e2d26f5cf6
parente0f23b69a26bc15ad216fdc2acaaa91d7f300628 (diff)
xlop (8jan17)
git-svn-id: svn://tug.org/texlive/trunk@42899 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/xlop/LISEZMOI7
-rw-r--r--Master/texmf-dist/doc/generic/xlop/README3
-rw-r--r--Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.pdfbin340255 -> 346691 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.tex42
-rw-r--r--Master/texmf-dist/doc/generic/xlop/xlop-doc.pdfbin321396 -> 328002 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xlop/xlop-doc.tex56
-rw-r--r--Master/texmf-dist/source/generic/xlop/manual.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xlop/xlop.tex240
8 files changed, 334 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/generic/xlop/LISEZMOI b/Master/texmf-dist/doc/generic/xlop/LISEZMOI
index e8dbdc9449c..dac91214966 100644
--- a/Master/texmf-dist/doc/generic/xlop/LISEZMOI
+++ b/Master/texmf-dist/doc/generic/xlop/LISEZMOI
@@ -8,8 +8,8 @@ manipuler des nombres de taille quelconque, la seule limitation étant
la mémoire de TeX. Ces manipulations incluent toutes les opérations
usuelles, les entrées-sorties, la notion de variable numérique, les
tests et quelques opérations de haut niveau (sans permettre les
-opérations nécessitant un traitement infini telles que la racine
-carrée, l'exponentielle, les fonctions trigonométriques, etc.).
+opérations nécessitant un traitement infini telles l'exponentielle,
+les fonctions trigonométriques, etc.).
DISTRIBUTION
------------
@@ -21,8 +21,7 @@ Contenu
-------
La distribution comporte les fichiers suivants :
- LISEZ.MOI (celui que vous êtes en train de lire) ;
- - README (la même en anglais) ;
- - XLOP03 qui indique ce que devrait fournir la version prochaine ;
+ - README (le même en anglais) ;
- history.txt qui retrace l'historique rapide du projet ;
- manual.sty qui est le fichier de style nécessaire à la compilation
des fichiers de documentation ;
diff --git a/Master/texmf-dist/doc/generic/xlop/README b/Master/texmf-dist/doc/generic/xlop/README
index ea198b986ca..ca05f549833 100644
--- a/Master/texmf-dist/doc/generic/xlop/README
+++ b/Master/texmf-dist/doc/generic/xlop/README
@@ -6,7 +6,7 @@ operands. Second, xlop is able to deal with unlimited numbers, in
fact, limitations are due to TeX memory. This features include
basic arithmetic operations, input/ouput, numeric variables, tests,
and some high level operation (without operations which imply infinite
-processing such roots, exponential, trigonometric functions, etc.).
+processing such exponential, trigonometric functions, etc.).
DISTRIBUTION
------------
@@ -19,7 +19,6 @@ Contents
Distribution consists of files:
* README (the file you are reading)
* LISEZ.MOI (same in french)
- * XLOP03 indicates what features the next version should be provide
* history.txt relates project history
* manual.sty package file to compile documentation
* xlop-doc-fr.tex and xlop-doc-fr.pdf source and pdf of french user's
diff --git a/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.pdf b/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.pdf
index bf995e2639a..04743ca0a2f 100644
--- a/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.pdf
+++ b/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.tex b/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.tex
index 037aeb4c8f6..060cde198b5 100644
--- a/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.tex
+++ b/Master/texmf-dist/doc/generic/xlop/xlop-doc-fr.tex
@@ -1461,6 +1461,43 @@ de ces trois macros.
\end{tabular}
\end{center}
+\index{racine carrée}
+Avec la version~0.26, \package{xlop} propose l'opération de racine
+carrée \macro{opsqrt}. Cette macro n'a pas la même syntaxe que les
+autres macros arithmétiques puisqu'il n'y a pas de forme étoilée. En
+réalité, il y a bien une façon d'afficher l'opération d'extraction de
+racine carrée mais elle n'est pas franchement courante. Je suis
+relativement âgé et mon grand-père me racontait qu'il l'avait vue
+lorsqu'il était à l'école. Ainsi, il y a une macro \macro{opgfsqrt} où
+le \og gf \fg{} est pour \og grandfather \fg{} (grand-père).
+
+Voyons la première macro : celle qui calcule la racine carrée et qui
+stocke le résultat dans une variable \package{xlop}:
+\begin{SideBySideExample}
+ \opsqrt{2}{sqrt2}
+ $\sqrt{2}\approx\opprint{sqrt2}$
+\end{SideBySideExample}
+Cette macro partage le paramètre \parameter{maxdivstep} avec les
+macros de division. Par exemple:
+\begin{SideBySideExample}
+ \opsqrt[maxdivstep=15]{2}{sqrt2}
+ $\sqrt{2}\approx\opprint{sqrt2}$
+\end{SideBySideExample}
+
+Pour la présentation à la \og grand-père \fg{}, je n'ai vraiment pas
+le courage d'expliquer tout le processus. Il se base sur l'eidentioté
+remarquable $(a+b)^2=a^2+2ab+b^2$. Merci à Jean-Michel Sarlat d'avoir
+pris le temps de m'expliquer cette méthode afin que je puisse la coder
+dans \package{xlop}.
+
+Voici un exemple avec le calcul de la racine carrée de 15 :
+\begin{CenterExample}
+ \opgfsqrt[maxdivstep=5]{15}
+\end{CenterExample}
+Cette méthode est horrible, autant pour un humain que pour
+l'ordinateur. Par exemple, l'opération réellement effectuée par
+\package{xlop} se fonde sur la méthode de Héron.
+
\index{expression complexe|(}
La dernière macro qui nous reste à voir est \macro{opexpr} qui permet
de réaliser le calcul d'une expression complexe. Cette macro demande
@@ -1737,6 +1774,9 @@ ce à quoi il faut s'attendre.
Construit le nombre \verb+N+ avec le seul chiffre situé en
\verb+T+ième position de la partie entière du nombre
\verb+n+. \\\hline
+ \verb+\opgfsqrt{n}+ &
+ Affiche la façon ancienne d'afficher le calcul de la racine
+ carrée de \verb+n+. \\\hline
\verb+\ophline(T1,T2){T3}+ &
Trace un trait horizontal de longueur \verb+T3+, d'épaisseur
\verb+hrulewidth+ et débutant en \verb+(T1,T2)+ par
@@ -1787,6 +1827,8 @@ ce à quoi il faut s'attendre.
\verb+\opsetintegerdigit{n}{T}{N}+ &
Modifie le \verb+T+ième chiffre de la partie entière de
\verb+N+ pour qu'il soit égal à \verb+n+. \\\hline
+ \verb+\opsqrt{n}{N}+ &
+ Mémorise la racine carrée de \verb+n+ dans \verb+N+. \\\hline
\verb+\opsub[P]{n1}{n2}+ &
Affiche le résultat de l'opération n1-n2. \\\hline
\verb+\opsub*{n1}{n2}{N}+ &
diff --git a/Master/texmf-dist/doc/generic/xlop/xlop-doc.pdf b/Master/texmf-dist/doc/generic/xlop/xlop-doc.pdf
index 4b75108c46f..1910db999ae 100644
--- a/Master/texmf-dist/doc/generic/xlop/xlop-doc.pdf
+++ b/Master/texmf-dist/doc/generic/xlop/xlop-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/xlop/xlop-doc.tex b/Master/texmf-dist/doc/generic/xlop/xlop-doc.tex
index 396c09e141d..fb623b21d04 100644
--- a/Master/texmf-dist/doc/generic/xlop/xlop-doc.tex
+++ b/Master/texmf-dist/doc/generic/xlop/xlop-doc.tex
@@ -248,7 +248,7 @@ page~\pageref{sec:Creation d'operations complexes}.
\index{number!valid}In practice, what does it mean all these rules?
First, they means that a number writes in a decimal form can be
preceded by any sequence of plus or minus signs. Obviously, if there
-is a odd number of minus signs, the number will be negative. Next, a
+is an odd number of minus signs, the number will be negative. Next, a
decimal number admits only one decimal separator symbol which can
be a dot or a comma, this one can be put anywhere in the
number. Finally, a number is write in basis~10. Be carefull: these
@@ -262,7 +262,7 @@ variable name with the character \texttt{@}.
\index{parameter!syntax|(}
Parameter assignments are local to the macro when they are indicated
in the optional argument. To make global a parameter assignment, you
-have to use the \macro{opset} macro. For example:
+have to use the \macro{opset} macro. For instance:
\begin{Verbatim}[xrightmargin=0pt]
\opset{decimalsepsymbol={,}}
\end{Verbatim}
@@ -779,7 +779,7 @@ only) under the control of \parameter{maxdivstep},
\parameter{safedivstep}, and \parameter{period} parameters. It is only
partially true because a classical division will stop automatically
when a remainder will be zero, whatever the values of these three
-parameters and a euclidean division will stop with an integer quotient
+parameters and an euclidean division will stop with an integer quotient
without attention for these three parameters.
\begin{SideBySideExample}
\opdiv{25}{7}
@@ -845,7 +845,7 @@ $\left\lfloor\frac{2^{31}-1}{10}\right\rfloor = 214748364$.
In order to avoid too long calculations, \package{xlop} don't process
beyond the value of \parameter{safedivstep} parameter in division with
period. Its default value is~50. However, \package{xlop} package show
-this problem. For example, if you ask for such a division with the
+this problem. For instance, if you ask for such a division with the
code:
\begin{Verbatim}[xrightmargin=0pt,frame=none]
\opdiv[period]{1}{289}
@@ -1388,6 +1388,42 @@ work.
\end{tabular}
\end{center}
+\index{square root}
+With version~0.26 comes the square root operation:
+\macro{opsqrt}. This macro has not the same syntax as the other
+arithmetic macros since there is no starred version. In fact, there is
+a way to display a processing of square root but it's really not
+current. I'm pretty old and my grandfather told me that he saw
+this method when he was young! Therefore, there is an \macro{opgfsqrt}
+macro to display the operation (``gf'' for grandfather).
+
+Let us see the first macro: the one which calculates the square root
+and store the result in a xlop variable:
+\begin{SideBySideExample}
+ \opsqrt{2}{sqrt2}
+ $\sqrt{2}\approx\opprint{sqrt2}$
+\end{SideBySideExample}
+This macro shares the parameter \parameter{maxdivstep} with division
+macros. For instance:
+\begin{SideBySideExample}
+ \opsqrt[maxdivstep=15]{2}{sqrt2}
+ $\sqrt{2}\approx\opprint{sqrt2}$
+\end{SideBySideExample}
+
+For ``grandfather'' display, I have not the energy to explain the
+processus. It's based on remarkable identity
+$(a+b)^2=a^2+2ab+b^2$. Thanks to Jean-Michel Sarlat who had taken time
+to explain this method in order that I can write it for
+\package{xlop}!
+
+Here is an example for square root of 15:
+\begin{CenterExample}
+ \opgfsqrt[maxdivstep=5]{15}
+\end{CenterExample}
+This method is horrible. It's horrible for human being. It's horrible
+for computer. For instance, the real operation isn't make that way:
+it uses Heron method.
+
\index{complex expression|(}
The very last macro we have to study is \macro{opexpr}. It calculates
a complex expression. This macro needs two parameters: the first one
@@ -1564,7 +1600,7 @@ expected.
\index{compilation time|)}\index{time (calculation)|)}%
\newpage
-\section{Macros List}
+\section{Macro List}
\label{sec:Liste des macros}
\index{macros!table of|(}%
\noindent\begin{longtable}{|l|p{6.3cm}|}
@@ -1641,6 +1677,9 @@ expected.
\verb+\opgetintegerdigit{n}{T}{N}+ &
Build the number \verb+N+ width the only digit in slot
\verb+T+ of integer part of \verb+n+. \\\hline
+ \verb+\opgfsqrt{n}+ &
+ Display the old timed way to calculate a square root of
+ \verb+n+. \\\hline
\verb+\ophline(T1,T2){T3}+ &
Draw a horizontal rule of length \verb+T3+, of thickness
\verb+hrulewidth+, and which begin at \verb+(T1,T2)+ in relation to
@@ -1690,6 +1729,8 @@ expected.
\verb+\opsetintegerdigit{n}{T}{N}+ &
Modify the digit of rank \verb+T+ in integer part of \verb+N+ in
order to have the value \verb+n+ for this digit. \\\hline
+ \verb+\opsqrt{n}{N}+ & Put square root of \verb+n+ in
+ \verb+N+. \\\hline
\verb+\opsub[P]{n1}{n2}+ &
Display result of \verb+n1-n2+. \\\hline
\verb+\opsub*{n1}{n2}{N}+ &
@@ -1816,7 +1857,8 @@ In this table, parameters:
shifting. \\\hline
\verb+maxdivstep+ &
\verb+10+ &
- Maximal number of steps in division. \\\hline
+ Maximal number of steps in division or in square root
+ operation. \\\hline
\verb+safedivstep+ &
\verb+50+ &
Maximal number of steps in division when there is a period to
@@ -2070,7 +2112,7 @@ ones).
\end{SideBySideExample}
Note that this code is very bad: it is very slow and don't give
-anything against native \TeX{} operations. It is only a educational
+anything against native \TeX{} operations. It is only an educational
example. Note also that the tricks to put loop into loop with macro
\verb+\testprimality+ inside a group. \package{xlop} operations give
global results.\index{global allocation}
diff --git a/Master/texmf-dist/source/generic/xlop/manual.sty b/Master/texmf-dist/source/generic/xlop/manual.sty
index 1047dd3766d..e5f4f549d32 100644
--- a/Master/texmf-dist/source/generic/xlop/manual.sty
+++ b/Master/texmf-dist/source/generic/xlop/manual.sty
@@ -17,7 +17,9 @@
\geometry{a4paper,left=4cm,right=4cm,top=3cm,bottom=3cm,nohead}
\let\SBSori\SideBySideExample
-\def\SideBySideExample{\par\bigbreak\SBSori}
+\def\SideBySideExample{%
+ \par\bigbreak\SBSori
+}
\let\endSBSori\endSideBySideExample
\def\endSideBySideExample{%
\endSBSori
diff --git a/Master/texmf-dist/tex/generic/xlop/xlop.tex b/Master/texmf-dist/tex/generic/xlop/xlop.tex
index 057cea4540a..ef3360dd438 100644
--- a/Master/texmf-dist/tex/generic/xlop/xlop.tex
+++ b/Master/texmf-dist/tex/generic/xlop/xlop.tex
@@ -1,12 +1,12 @@
-\def\fileversion{0.25}
-\def\filedate{2013/02/26}
+\def\fileversion{0.26}
+\def\filedate{2017/01/07}
%%
%% xlop.tex:
%% eXtra Large OPeration macros for Generic TeX.
%% See `user.pdf' for documentation;
%% `hacker.pdf' for explanation.
%%
-%% Copyright 2005,2006, by Jean-C\^ome Charpentier
+%% Copyright 2005,2017, by Jean-C\^ome Charpentier
%% Jean-Come.Charpentier@wanadoo.fr
%%
%% This program may be distributed and/or modified under the
@@ -933,6 +933,11 @@
\advance\op@count@i by1
\xdef\op@@export{\@nameuse{OP@tmp@\the\op@count@vi}\op@@export}%
\repeat
+ % add 0.26
+ \ifnum\OP@tmp@s=1
+ \xdef\op@@export{-\op@@export}%
+ \fi
+ % end add 0.26
\fi
% comment 0.24
% \fi
@@ -1878,7 +1883,7 @@
\op@split{#3}{b}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Ajout du 20/11/2006 %%%
-%%% Sur indication de Cristophe Poulain %%%
+%%% Sur indication de Christophe Poulain %%%
\op@cmp{b}{zero}%
\ifopeq
\op@error{divisor must be nonzero}%
@@ -3481,6 +3486,233 @@
\op@floor{#1}{#2}%
\fi
}
+% add 0.26
+\op@split{0}{@zero}
+\op@split{1}{@one}
+\op@split{2}{@two}
+\op@split{3}{@three}
+\op@split{4}{@four}
+\op@split{5}{@five}
+\op@split{6}{@six}
+\op@split{7}{@seven}
+\op@split{8}{@height}
+\op@split{9}{@nine}
+\op@split{10}{@ten}
+
+\def\opsqrt{%
+ \@ifnextchar[{\op@sqrt}{\op@sqrt[nil]}%]
+}
+\def\op@sqrt[#1]#2#3{%
+ \begingroup
+ \opset{#1}%
+ \opcmp{0}{#2}%
+ \ifopeq
+ \op@copy{@zero}{U}%
+ \let\op@savemaxdivstep\op@maxdivstep
+ \else
+ \op@split{#2}{z}%
+ \op@count@z=\OP@z@i
+ \divide\op@count@z by2
+ \edef\op@savemaxdivstep{\op@maxdivstep}%
+ \op@count@i=\op@maxdivstep
+ \advance\op@count@i by\op@count@z
+ \advance\op@count@i by1
+ \edef\op@maxdivstep{\the\op@count@i}%
+ \ifodd\OP@z@i
+ \xdef\op@initsqrt{\@nameuse{OP@z@\OP@z@w}}%
+ \else
+ \op@count@z=\OP@z@w
+ \xdef\op@initsqrt{\@nameuse{OP@z@\the\op@count@z}}%
+ \advance\op@count@z by-1
+ \xdef\op@initsqrt{\op@initsqrt\@nameuse{OP@z@\the\op@count@z}}%
+ \fi
+ \ifnum\op@initsqrt<1
+ \op@copy{@zero}{u}%
+ \else\ifnum\op@initsqrt<3
+ \op@copy{@one}{u}%
+ \else\ifnum\op@initsqrt<7
+ \op@copy{@two}{u}%
+ \else\ifnum\op@initsqrt<13
+ \op@copy{@three}{u}%
+ \else\ifnum\op@initsqrt<21
+ \op@copy{@four}{u}%
+ \else\ifnum\op@initsqrt<31
+ \op@copy{@five}{u}%
+ \else\ifnum\op@initsqrt<43
+ \op@copy{@six}{u}%
+ \else\ifnum\op@initsqrt<57
+ \op@copy{@seven}{u}%
+ \else\ifnum\op@initsqrt<73
+ \op@copy{@height}{u}%
+ \else\ifnum\op@initsqrt<91
+ \op@copy{@nine}{u}%
+ \else
+ \op@copy{@ten}{u}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \op@count@ii=\OP@z@i
+ \advance\op@count@ii by1
+ \divide\op@count@ii by2
+ \advance\op@count@ii by-1
+ \op@lshift{\the\op@count@ii}{u}%
+ \op@count@z=\OP@z@w
+ \advance\op@count@z by1
+ \edef\op@@maxdivstep{\op@maxdivstep}%
+ \loop
+ \op@mul{u}{u}{U}%
+ \op@add{U}{z}{U}%
+ \op@mul{u}{@two}{D}%
+ \edef\op@maxdivstep{\the\op@count@z}%
+ \op@div{0}{U}{D}{U}{r}%
+ \multiply\op@count@z by2
+ \ifnum\op@count@z>\op@@maxdivstep
+ \op@count@z=\op@@maxdivstep
+ \fi
+ \op@cmp{u}{U}%
+ \ifopneq
+ \op@copy{U}{u}%
+ \repeat
+ \fi
+ \op@unsplit{U}{#3}%
+ \opround{#3}{\op@savemaxdivstep}{#3}%
+ \endgroup
+}
+
+\def\opgfsqrt{%
+ \@ifnextchar[{\op@gfsqrt}{\op@gfsqrt[nil]}%]
+}
+\def\op@gfsqrt[#1]#2{%
+ \begingroup
+ \edef\op@saveparindent{\the\parindent}%
+ \parindent=0pt
+ \opset{#1}%
+ \op@split{#2}{sq}%
+ \opsqrt{#2}{@sqrt}%
+ \op@split{@sqrt}{sqrt}%
+ \op@split{\op@initsqrt}{init}%
+ \op@count@z=\OP@sqrt@w
+ \op@split{\@nameuse{OP@sqrt@\the\op@count@z}}{atosub}%
+ \op@mul{atosub}{atosub}{tosub}%
+ \setbox1=\hbox{\kern\opcolumnwidth
+ \op@display{operandstyle.1}{sq}}%
+ \setbox2=\vtop{%
+ \hbox{\ophline(-0.5,-0.25){\OP@sqrt@w.5}%
+ \op@display{resultstyle}{sqrt}}%
+ \hbox{\op@display{intermediarystyle.1}{atosub}%
+ \hbox to\opcolumnwidth{\hss\op@mulsymbol\hss}%
+ \op@display{intermediarystyle.1}{atosub}%
+ \hbox to\opcolumnwidth{\hss\op@equalsymbol\hss}%
+ \op@display{operandstyle.2}{tosub}}%
+ }
+ \op@sub{init}{tosub}{rest}%
+ \op@count@ii=\OP@init@w
+ \op@count@iii=\op@count@ii
+ \advance\op@count@iii by1
+ \setbox1=\hbox{\hsize=\op@count@iii\opcolumnwidth\vtop{%
+ \box1
+ \hbox{%
+ \op@makebox{\the\op@count@iii}{0}%
+ {operandstyle.2}{tosub}%
+ \box0}}}%
+ \op@unzero{rest}%
+ \op@copy{@zero}{cursqrt}%
+ \op@copy{@zero}{digitmul}%
+ \op@count@i=\OP@sq@w
+ \advance\op@count@i by-\OP@init@w
+ \op@count@iv=2
+ \loop
+ \ifnum\op@count@z>1
+ \op@lshift{2}{rest}%
+ \ifnum\op@count@i>0
+ \@namexdef{OP@rest@2}{\@nameuse{OP@sq@\the\op@count@i}}%
+ \advance\op@count@i by-1
+ \ifnum\op@count@i>0
+ \@namexdef{OP@rest@1}{\@nameuse{OP@sq@\the\op@count@i}}%
+ \advance\op@count@i by-1
+ \fi
+ \fi
+ \op@count@ii=\op@count@iii
+ \advance\op@count@ii by-\OP@tosub@w
+ \advance\op@count@ii by-1
+ \advance\op@count@iii by2
+ \setbox1=\hbox{\hsize=\op@count@iii\opcolumnwidth
+ \vtop{%
+ \hbox{\box1}%
+ \hbox{%
+ \oplput(\op@count@ii,0.75){\ophline(0,0){1}}%
+ \oplput(\op@count@ii,0.75){\ophline(1,0){\OP@tosub@w}}%
+ \advance\op@count@iv by-1
+ \op@makebox{\the\op@count@iii}{0}%
+ {remainderstyle.\the\op@count@iv}{rest}%
+ \advance\op@count@iv by1
+ \oplput(\op@count@ii,1.5){$-$}%
+ \box0}%
+ }}%
+ \op@multen{cursqrt}%
+ \@namexdef{OP@cursqrt@1}%
+ {\@nameuse{OP@sqrt@\the\op@count@z}}%
+ \advance\op@count@z by-1
+ \op@mul{cursqrt}{@two}{atosub}%
+ \op@unzero{atosub}%
+ \op@multen{atosub}%
+ \@namexdef{OP@atosub@1}%
+ {\@nameuse{OP@sqrt@\the\op@count@z}}%
+ \@namexdef{OP@digitmul@1}%
+ {\@nameuse{OP@sqrt@\the\op@count@z}}%
+ \op@mul{atosub}{digitmul}{tosub}%
+ \op@unzero{tosub}%
+ \setbox2=\hbox{\vtop{%
+ \hbox{\box2}%
+ \hbox{\vrule width0pt height0pt
+ depth\oplineheight}%
+ \hbox{%
+ \op@display
+ {intermediarystyle.\the\op@count@iv}{atosub}%
+ \hbox to\opcolumnwidth{\hss\op@mulsymbol\hss}%
+ \op@display
+ {intermediarystyle.\the\op@count@iv}{digitmul}%
+ \hbox to\opcolumnwidth{\hss\op@equalsymbol\hss}%
+ \advance\op@count@iv by1
+ \op@display{operandstyle.\the\op@count@iv}{tosub}%
+ }%
+ }}%
+ \op@sub{rest}{tosub}{rest}%
+ \op@unzero{rest}%
+ \advance\op@count@iv by1
+ \setbox1=\hbox{\hsize=\op@count@iii\opcolumnwidth
+ \vtop{%
+ \hbox{\box1}%
+ \hbox{%
+ \op@makebox{\the\op@count@iii}{0}%
+ {operandstyle.\the\op@count@iv}{tosub}%
+ \box0}}}%
+ \repeat
+ \op@count@ii=\op@count@iii
+ \advance\op@count@ii by-\OP@tosub@w
+ \advance\op@count@ii by-1
+ \setbox1=\hbox{\hsize=\op@count@iii\opcolumnwidth
+ \vtop{%
+ \hbox{\box1}%
+ \hbox{%
+ \oplput(\op@count@ii,0.75){%
+ \ophline(0,0){1}}%
+ \oplput(\op@count@ii,0.75){%
+ \ophline(1,0){\OP@tosub@w}}%
+ \op@makebox{\the\op@count@iii}{0}%
+ {remainderstyle.\the\op@count@iv}{rest}%
+ \oplput(\op@count@ii,1.5){$-$}%
+ \box0}%
+ }%
+ }%
+ \parindent=\op@saveparindent
+ \leavevmode\hbox{%
+ \box1
+ \kern0.5\opcolumnwidth
+ \vrule
+ \kern0.5\opcolumnwidth
+ \box2}%
+ \endgroup
+ }
+% end add 0.26
\edef\opHatCode{\the\catcode`\^}
\catcode`\^=12\relax
\def\opexpr{\@ifnextchar[{\op@exprarg}{\op@exprarg[nil]}}