diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/apnum/apnum.d | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/apnum/apnum.pdf | bin | 642960 -> 643161 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/generic/apnum/apnum.tex | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/apnum/apnum.d b/Master/texmf-dist/doc/generic/apnum/apnum.d index c52f660b26f..b612c363325 100644 --- a/Master/texmf-dist/doc/generic/apnum/apnum.d +++ b/Master/texmf-dist/doc/generic/apnum/apnum.d @@ -10,7 +10,7 @@ \input utf8off \clearmubyte % use pdfcsplain -\def\projectversion{1.4 Dec 2015} +\def\projectversion{1.4a Dec 2015} \def\headtitle{Arbitrary Precision Numbers} \widowpenalty=10000 @@ -536,9 +536,9 @@ The main task of the "\evaldef\x{\A+\B*(\C+\D)+\E}" is to prepare the macro "\apPLUS{\apPLUS{\A}{\apMUL{\B}{\apPLUS{\C}{\D}}}}{\E}" and to execute the "\tmpb" macro. -The expression scanner adds the "\end" at the end of the expression and +The expression scanner adds the "\limits" at the end of the expression and reads from left to right the couples ``operand, operator''. For our example: -"\A+", "\B*", "\C+", "\D+" and "\E\end". The "\end" operator has the +"\A+", "\B*", "\C+", "\D+" and "\E\limits". The "\limits" operator has the priority 0, plus, minus have priority 1, "*"~and~"/" have priority 2 and "^" has priority 3. The brackets are ignored, but each occurrence of the opening bracket "(" increases priority by 4 and each occurrence of closing bracket @@ -561,10 +561,10 @@ Now, the priority on the top is greater, then scanner pushes next couple and does the test on the top of the stack again. \begtt - \E \end 0 0<=1 exec: + \E \limits 0 0<=1 exec: {\A+{\B*{\C+\D}}} + 1 {{\A+{\B*{\C+\D}}}+\E} \end 0 0<=0 exec: bottom 0 bottom 0 RESULT -\endtt +\endtt Let $p_t$, $p_p$ are the priority on the top and the previous priority in the stack. Let $v_t$, $v_p$ are operands on the top and in the previous line in the stack, and the same notation is used for operators @@ -582,7 +582,7 @@ any usual application of this. The "\apEVALa" is executed. The macro \db apEVALa "<sequence>{<expression>}" runs the evaluation of the expression in the group. The base priority is initialized by "\apnumA=0", -then "\apEVALb<expression>\end" scans the expression and saves the +then "\apEVALb<expression>\limits" scans the expression and saves the result in the form "\apPLUS{\A}{\apMUL{\B}{\C}}" (etc.) into the "\tmpb" macro. This macro is executed. The group is finished by "\apEND" macro, which keeps the "\OUT", "\apSIGN" and "\apE" values unchanged. Finally the defined "<sequence>" is set diff --git a/Master/texmf-dist/doc/generic/apnum/apnum.pdf b/Master/texmf-dist/doc/generic/apnum/apnum.pdf Binary files differindex c1bc7a31b31..7be86bf0c01 100644 --- a/Master/texmf-dist/doc/generic/apnum/apnum.pdf +++ b/Master/texmf-dist/doc/generic/apnum/apnum.pdf diff --git a/Master/texmf-dist/tex/generic/apnum/apnum.tex b/Master/texmf-dist/tex/generic/apnum/apnum.tex index d16f159bc9a..919c95fa0c9 100644 --- a/Master/texmf-dist/tex/generic/apnum/apnum.tex +++ b/Master/texmf-dist/tex/generic/apnum/apnum.tex @@ -4,7 +4,7 @@ % See the documentation apnum.pdf or apnum.d for more information -\def\apVERSION{1.4 <Dec 2015>} +\def\apVERSION{1.4a <Dec 2015>} \message{The Arbitrary Precision Numbers, \apVERSION} %%%%%%%%%%%% Internal registers, sec. 2.1 in apnum.pdf @@ -26,7 +26,7 @@ %%%%%%%%%%%% Evaluation of the expression, sec. 2.2 in apnum.pdf \def\evaldef{\relax \apEVALa} -\def\apEVALa#1#2{\begingroup \apnumA=0 \apnumE=1 \apEVALb#2\end \tmpb \apEND \let#1=\OUT} +\def\apEVALa#1#2{\begingroup \apnumA=0 \apnumE=1 \apEVALb#2\limits \tmpb \apEND \let#1=\OUT} \def\apEVALb{\def\tmpa{}\apEVALc} \def\apEVALc#1{% \ifx+#1\apEVALd \apEVALc \fi @@ -66,7 +66,7 @@ \ifx)#1\advance\apnumA by-4 \let\apNext=\apEVALo \let\tmpa=\relax \ifnum\apnumA<0 \apEVALerror{many brackets ")"}\fi \fi - \ifx\end#1% + \ifx\limits#1% \ifnum\apnumA>0 \apEVALerror{missing bracket ")"}\let\tmpa=\relax \else \apEVALp\END 0\let\apNext=\relax \fi \fi @@ -1096,3 +1096,4 @@ - \ATAN, \ASIN, \ACOS added - \SIN, \COS, \TAN added - \apTOT=0 by default +1.4a \end -> \limits, internal change in \ebvaldef because LaTeX redefines \end |