diff options
Diffstat (limited to 'macros/latex/contrib/oberdiek/bigintcalc.dtx')
-rw-r--r-- | macros/latex/contrib/oberdiek/bigintcalc.dtx | 952 |
1 files changed, 1 insertions, 951 deletions
diff --git a/macros/latex/contrib/oberdiek/bigintcalc.dtx b/macros/latex/contrib/oberdiek/bigintcalc.dtx index 004fd97c14..40fa56ed1d 100644 --- a/macros/latex/contrib/oberdiek/bigintcalc.dtx +++ b/macros/latex/contrib/oberdiek/bigintcalc.dtx @@ -67,9 +67,6 @@ % Installation: % TDS:tex/generic/oberdiek/bigintcalc.sty % TDS:doc/latex/oberdiek/bigintcalc.pdf -% TDS:doc/latex/oberdiek/test/bigintcalc-test1.tex -% TDS:doc/latex/oberdiek/test/bigintcalc-test2.tex -% TDS:doc/latex/oberdiek/test/bigintcalc-test3.tex % TDS:source/latex/oberdiek/bigintcalc.dtx % %<*ignore> @@ -143,10 +140,6 @@ and the derived files % \file{bigintcalc-test1.tex}{\from{bigintcalc.dtx}{test1}}% % \file{bigintcalc-test2.tex}{\from{bigintcalc.dtx}{test2,etex}}% % \file{bigintcalc-test3.tex}{\from{bigintcalc.dtx}{test2,noetex}}% - \nopreamble - \nopostamble -% \usedir{source/latex/oberdiek/catalogue}% -% \file{bigintcalc.xml}{\from{bigintcalc.dtx}{catalogue}}% } \catcode32=13\relax% active space @@ -218,21 +211,6 @@ and the derived files % \fi % % -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % % \GetFileInfo{bigintcalc.drv} % @@ -3395,932 +3373,7 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}% % \begin{macrocode} %</package> % \end{macrocode} -% -% \section{Test} -% -% \subsection{Catcode checks for loading} -% -% \begin{macrocode} -%<*test1> -% \end{macrocode} -% \begin{macrocode} -\catcode`\{=1 % -\catcode`\}=2 % -\catcode`\#=6 % -\catcode`\@=11 % -\expandafter\ifx\csname count@\endcsname\relax - \countdef\count@=255 % -\fi -\expandafter\ifx\csname @gobble\endcsname\relax - \long\def\@gobble#1{}% -\fi -\expandafter\ifx\csname @firstofone\endcsname\relax - \long\def\@firstofone#1{#1}% -\fi -\expandafter\ifx\csname loop\endcsname\relax - \expandafter\@firstofone -\else - \expandafter\@gobble -\fi -{% - \def\loop#1\repeat{% - \def\body{#1}% - \iterate - }% - \def\iterate{% - \body - \let\next\iterate - \else - \let\next\relax - \fi - \next - }% - \let\repeat=\fi -}% -\def\RestoreCatcodes{} -\count@=0 % -\loop - \edef\RestoreCatcodes{% - \RestoreCatcodes - \catcode\the\count@=\the\catcode\count@\relax - }% -\ifnum\count@<255 % - \advance\count@ 1 % -\repeat - -\def\RangeCatcodeInvalid#1#2{% - \count@=#1\relax - \loop - \catcode\count@=15 % - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\RangeCatcodeCheck#1#2#3{% - \count@=#1\relax - \loop - \ifnum#3=\catcode\count@ - \else - \errmessage{% - Character \the\count@\space - with wrong catcode \the\catcode\count@\space - instead of \number#3% - }% - \fi - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\space{ } -\expandafter\ifx\csname LoadCommand\endcsname\relax - \def\LoadCommand{\input bigintcalc.sty\relax}% -\fi -\def\Test{% - \RangeCatcodeInvalid{0}{47}% - \RangeCatcodeInvalid{58}{64}% - \RangeCatcodeInvalid{91}{96}% - \RangeCatcodeInvalid{123}{255}% - \catcode`\@=12 % - \catcode`\\=0 % - \catcode`\%=14 % - \LoadCommand - \RangeCatcodeCheck{0}{36}{15}% - \RangeCatcodeCheck{37}{37}{14}% - \RangeCatcodeCheck{38}{47}{15}% - \RangeCatcodeCheck{48}{57}{12}% - \RangeCatcodeCheck{58}{63}{15}% - \RangeCatcodeCheck{64}{64}{12}% - \RangeCatcodeCheck{65}{90}{11}% - \RangeCatcodeCheck{91}{91}{15}% - \RangeCatcodeCheck{92}{92}{0}% - \RangeCatcodeCheck{93}{96}{15}% - \RangeCatcodeCheck{97}{122}{11}% - \RangeCatcodeCheck{123}{255}{15}% - \RestoreCatcodes -} -\Test -\csname @@end\endcsname -\end -% \end{macrocode} -% \begin{macrocode} -%</test1> -% \end{macrocode} -% -% \subsection{Macro tests} -% -% \subsubsection{Preamble with test macro definitions} -% -% \begin{macrocode} -%<*test2> -\NeedsTeXFormat{LaTeX2e} -\nofiles -\documentclass{article} -%<noetex>\let\SavedNumexpr\numexpr -%<noetex>\let\numexpr\UNDEFINED -\makeatletter -\chardef\BIC@TestMode=1 % -\makeatother -\usepackage{bigintcalc}[2016/05/16] -%<noetex>\let\numexpr\SavedNumexpr -\usepackage{qstest} -\IncludeTests{*} -\LogTests{log}{*}{*} -\newcommand*{\TestSpaceAtEnd}[1]{% -%<noetex> \let\SavedNumexpr\numexpr -%<noetex> \let\numexpr\UNDEFINED - \edef\resultA{#1}% - \edef\resultB{#1 }% -%<noetex> \let\numexpr\SavedNumexpr - \Expect*{\resultA\space}*{\resultB}% -} -\newcommand*{\TestResult}[2]{% -%<noetex> \let\SavedNumexpr\numexpr -%<noetex> \let\numexpr\UNDEFINED - \edef\result{#1}% -%<noetex> \let\numexpr\SavedNumexpr - \Expect*{\result}{#2}% -} -\newcommand*{\TestResultTwoExpansions}[2]{% -%<*noetex> - \begingroup - \let\numexpr\UNDEFINED - \expandafter\expandafter\expandafter - \endgroup -%</noetex> - \expandafter\expandafter\expandafter\Expect - \expandafter\expandafter\expandafter{#1}{#2}% -} -\newcount\TestCount -%<etex>\newcommand*{\TestArg}[1]{\numexpr#1\relax} -%<noetex>\newcommand*{\TestArg}[1]{#1} -\newcommand*{\TestTeXDivide}[2]{% - \TestCount=\TestArg{#1}\relax - \divide\TestCount by \TestArg{#2}\relax - \Expect*{\bigintcalcDiv{#1}{#2}}*{\the\TestCount}% -} -\newcommand*{\Test}[2]{% - \TestResult{#1}{#2}% - \TestResultTwoExpansions{#1}{#2}% - \TestSpaceAtEnd{#1}% -} -\newcommand*{\TestExch}[2]{\Test{#2}{#1}} -\newcommand*{\TestInv}[2]{% - \Test{\bigintcalcInv{#1}}{#2}% -} -\newcommand*{\TestAbs}[2]{% - \Test{\bigintcalcAbs{#1}}{#2}% -} -\newcommand*{\TestSgn}[2]{% - \Test{\bigintcalcSgn{#1}}{#2}% -} -\newcommand*{\TestMin}[3]{% - \Test{\bigintcalcMin{#1}{#2}}{#3}% -} -\newcommand*{\TestMax}[3]{% - \Test{\bigintcalcMax{#1}{#2}}{#3}% -} -\newcommand*{\TestCmp}[3]{% - \Test{\bigintcalcCmp{#1}{#2}}{#3}% -} -\newcommand*{\TestOdd}[2]{% - \Test{\bigintcalcOdd{#1}}{#2}% - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcOdd - \bigintcalcAbs{#1}!% - }{#2}% - }% - \x -} -\newcommand*{\TestInc}[2]{% - \Test{\bigintcalcInc{#1}}{#2}% - \ifnum\bigintcalcSgn{#1}>-1 % - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcInc\bigintcalcNum{#1}!% - }{#2}% - }% - \x - \fi -} -\newcommand*{\TestDec}[2]{% - \Test{\bigintcalcDec{#1}}{#2}% - \ifnum\bigintcalcSgn{#1}>0 % - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcDec\bigintcalcNum{#1}!% - }{#2}% - }% - \x - \fi -} -\newcommand*{\TestAdd}[3]{% - \Test{\bigintcalcAdd{#1}{#2}}{#3}% - \ifnum\bigintcalcSgn{#1}>0 % - \ifnum\bigintcalcSgn{#2}> 0 % - \ifnum\bigintcalcCmp{#1}{#2}>0 % - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcAdd - \bigintcalcNum{#1}!\bigintcalcNum{#2}!% - }{#3}% - }% - \x - \else - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcAdd - \bigintcalcNum{#2}!\bigintcalcNum{#1}!% - }{#3}% - }% - \x - \fi - \fi - \fi -} -\newcommand*{\TestSub}[3]{% - \Test{\bigintcalcSub{#1}{#2}}{#3}% - \ifnum\bigintcalcSgn{#1}>0 % - \ifnum\bigintcalcSgn{#2}> 0 % - \ifnum\bigintcalcCmp{#1}{#2}>0 % - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcSub - \bigintcalcNum{#1}!\bigintcalcNum{#2}!% - }{#3}% - }% - \x - \fi - \fi - \fi -} -\newcommand*{\TestShl}[2]{% - \Test{\bigintcalcShl{#1}}{#2}% - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcShl\bigintcalcAbs{#1}!% - }{\bigintcalcAbs{#2}}% - }% - \x -} -\newcommand*{\TestShr}[2]{% - \Test{\bigintcalcShr{#1}}{#2}% - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcShr\bigintcalcAbs{#1}!% - }{\bigintcalcAbs{#2}}% - }% - \x -} -\newcommand*{\TestMul}[3]{% - \Test{\bigintcalcMul{#1}{#2}}{#3}% - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcMul - \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% - }{\bigintcalcAbs{#3}}% - }% - \x -} -\newcommand*{\TestSqr}[2]{% - \Test{\bigintcalcSqr{#1}}{#2}% -} -\newcommand*{\TestFac}[2]{% - \expandafter\TestExch\expandafter{% - \the\numexpr#2% - }{\bigintcalcFac{#1}}% -} -\newcommand*{\TestFacBig}[2]{% - \Test{\bigintcalcFac{#1}}{#2}% -} -\newcommand*{\TestPow}[3]{% - \Test{\bigintcalcPow{#1}{#2}}{#3}% -} -\newcommand*{\TestDiv}[3]{% - \Test{\bigintcalcDiv{#1}{#2}}{#3}% - \TestTeXDivide{#1}{#2}% -} -\newcommand*{\TestDivBig}[3]{% - \Test{\bigintcalcDiv{#1}{#2}}{#3}% - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcDiv\bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% - }{\bigintcalcAbs{#3}}% - }% -} -\newcommand*{\TestMod}[3]{% - \Test{\bigintcalcMod{#1}{#2}}{#3}% - \ifcase\ifcase\bigintcalcSgn{#1} 0% - \or - \ifcase\bigintcalcSgn{#2} 1% - \or 0% - \else 1% - \fi - \else - \ifcase\bigintcalcSgn{#2} 1% - \or 1% - \else 0% - \fi - \fi\relax - \edef\x{% - \noexpand\Test{% - \noexpand\BigIntCalcMod - \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% - }{\bigintcalcAbs{#3}}% - }% - \x - \fi -} -% \end{macrocode} -% -% \subsubsection{Time} -% -% \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname pdfresettimer\endcsname\relax -\else - \makeatletter - \newcount\SummaryTime - \newcount\TestTime - \SummaryTime=\z@ - \newcommand*{\PrintTime}[2]{% - \typeout{% - [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% - }% - }% - \newcommand*{\StartTime}[1]{% - \renewcommand*{\TimeDescription}{#1}% - \pdfresettimer - }% - \newcommand*{\TimeDescription}{}% - \newcommand*{\StopTime}{% - \TestTime=\pdfelapsedtime - \global\advance\SummaryTime\TestTime - \PrintTime\TimeDescription\TestTime - }% - \let\saved@qstest\qstest - \let\saved@endqstest\endqstest - \def\qstest#1#2{% - \saved@qstest{#1}{#2}% - \StartTime{#1}% - }% - \def\endqstest{% - \StopTime - \saved@endqstest - }% - \AtEndDocument{% - \PrintTime{summary}\SummaryTime - }% - \makeatother -\fi -% \end{macrocode} -% -% \subsubsection{Test sets} -% -% \begin{macrocode} -\makeatletter - -\begin{qstest}{inv}{inv}% - \TestInv{0}{0}% - \TestInv{1}{-1}% - \TestInv{-1}{1}% - \TestInv{10}{-10}% - \TestInv{-10}{10}% - \TestInv{2147483647}{-2147483647}% - \TestInv{-2147483647}{2147483647}% - \TestInv{12345678901234567890}{-12345678901234567890}% - \TestInv{-12345678901234567890}{12345678901234567890}% - \TestInv{ 0 }{0}% - \TestInv{ 1 }{-1}% - \TestInv{--1}{-1}% - \TestInv{\number\z@}{0}% - \TestInv{\ifx\relax\relax1\fi}{-1}% - \TestInv{\ifx\relax\relax-\fi\ifx234\else1\fi}{1}% -\end{qstest} - -\begin{qstest}{abs}{abs}% - \TestAbs{0}{0}% - \TestAbs{1}{1}% - \TestAbs{-1}{1}% - \TestAbs{10}{10}% - \TestAbs{-10}{10}% - \TestAbs{2147483647}{2147483647}% - \TestAbs{-2147483647}{2147483647}% - \TestAbs{12345678901234567890}{12345678901234567890}% - \TestAbs{-12345678901234567890}{12345678901234567890}% - \TestAbs{ 0 }{0}% - \TestAbs{ 1 }{1}% - \TestAbs{--1}{1}% - \TestAbs{-+-+1}{1}% - \TestAbs{00000000000}{0}% - \TestAbs{00000001000}{1000}% - \TestAbs{\ifx\relax\relax 0\else 1\fi}{0}% -\end{qstest} - -\begin{qstest}{sign}{sign}% - \TestSgn{0}{0}% - \TestSgn{1}{1}% - \TestSgn{-1}{-1}% - \TestSgn{10}{1}% - \TestSgn{-10}{-1}% - \TestSgn{2147483647}{1}% - \TestSgn{-2147483647}{-1}% - \TestSgn{12345678901234567890}{1}% - \TestSgn{-12345678901234567890}{-1}% - \TestSgn{ 0 }{0}% - \TestSgn{ 2 }{1}% - \TestSgn{ -2 }{-1}% - \TestSgn{--2}{1}% - \TestSgn{\number\z@}{0}% - \TestSgn{\number\@ne}{1}% - \TestSgn{\number\m@ne}{-1}% - \TestSgn{% - -+-+\number\z@\number\z@ - \iftrue1\fi\iftrue2\fi\iftrue3\fi - }{1}% -\end{qstest} - -\begin{qstest}{min}{min}% - \TestMin{0}{1}{0}% - \TestMin{1}{0}{0}% - \TestMin{-10}{-20}{-20}% - \TestMin{ 1 }{ 2 }{1}% - \TestMin{ 2 }{ 1 }{1}% - \TestMin{1}{1}{1}% - \TestMin{\number\z@}{\number\@ne}{0}% - \TestMin{\number\@ne}{\number\m@ne}{-1}% -\end{qstest} - -\begin{qstest}{max}{max}% - \TestMax{0}{1}{1}% - \TestMax{1}{0}{1}% - \TestMax{-10}{-20}{-10}% - \TestMax{ 1 }{ 2 }{2}% - \TestMax{ 2 }{ 1 }{2}% - \TestMax{1}{1}{1}% - \TestMax{\number\z@}{\number\@ne}{1}% - \TestMax{\number\@ne}{\number\m@ne}{1}% -\end{qstest} - -\begin{qstest}{cmp}{cmp}% - \TestCmp{0}{0}{0}% - \TestCmp{-21}{17}{-1}% - \TestCmp{3}{4}{-1}% - \TestCmp{-10}{-10}{0}% - \TestCmp{-10}{-11}{1}% - \TestCmp{100}{5}{1}% - \TestCmp{9}{10}{-1}% - \TestCmp{10}{9}{1}% - \TestCmp{ 3 }{ 3 }{0}% - \TestCmp{-9}{-10}{1}% - \TestCmp{-10}{-9}{-1}% - \TestCmp{-3}{-3}{0}% - \TestCmp{0}{-2}{1}% - \TestCmp{0}{2}{-1}% - \TestCmp{2}{0}{1}% - \TestCmp{-2}{0}{-1}% - \TestCmp{12}{11}{1}% - \TestCmp{11}{12}{-1}% - \TestCmp{2147483647}{-2147483647}{1}% - \TestCmp{-2147483647}{2147483647}{-1}% - \TestCmp{2147483647}{2147483647}{0}% - \TestCmp{\number\z@}{\number\@ne}{-1}% - \TestCmp{\number\@ne}{\number\m@ne}{1}% - \TestCmp{ 4 }{ 5 }{-1}% - \TestCmp{ -3 }{ -7 }{1}% -\end{qstest} - -\begin{qstest}{odd}{odd} -\tracingmacros=1 - \TestOdd{0}{0}% - \TestOdd{1}{1}% - \TestOdd{2}{0}% - \TestOdd{3}{1}% - \TestOdd{14}{0}% - \TestOdd{15}{1}% - \TestOdd{12345678901234567896}{0}% - \TestOdd{12345678901234567897}{1}% -\end{qstest} - -\begin{qstest}{inc}{inc}% - \TestInc{0}{1}% - \TestInc{1}{2}% - \TestInc{-1}{0}% - \TestInc{10}{11}% - \TestInc{-10}{-9}% - \TestInc{ 3 }{4}% - \TestInc{999}{1000}% - \TestInc{-1000}{-999}% - \TestInc{129}{130}% - \TestInc{2147483646}{2147483647}% - \TestInc{-2147483647}{-2147483646}% - \TestInc{12345678901234567890}{12345678901234567891}% - \TestInc{99999999999999999999}{100000000000000000000}% - \TestInc{-12345678901234567891}{-12345678901234567890}% - \TestInc{-100000000000000000000}{-99999999999999999999}% -\end{qstest} - -\begin{qstest}{dec}{dec}% - \TestDec{0}{-1}% - \TestDec{1}{0}% - \TestDec{-1}{-2}% - \TestDec{10}{9}% - \TestDec{-10}{-11}% - \TestDec{1000}{999}% - \TestDec{-999}{-1000}% - \TestDec{130}{129}% - \TestDec{2147483647}{2147483646}% - \TestDec{-2147483646}{-2147483647}% - \TestDec{12345678901234567891}{12345678901234567890}% - \TestDec{100000000000000000000}{99999999999999999999}% - \TestDec{-12345678901234567890}{-12345678901234567891}% - \TestDec{-99999999999999999999}{-100000000000000000000}% -\end{qstest} - -\begin{qstest}{add}{add}% - \TestAdd{0}{0}{0}% - \TestAdd{1}{0}{1}% - \TestAdd{0}{1}{1}% - \TestAdd{1}{2}{3}% - \TestAdd{-1}{-1}{-2}% - \TestAdd{2147483646}{1}{2147483647}% - \TestAdd{-2147483647}{2147483647}{0}% - \TestAdd{20}{-5}{15}% - \TestAdd{-4}{-1}{-5}% - \TestAdd{-1}{-4}{-5}% - \TestAdd{-4}{1}{-3}% - \TestAdd{-1}{4}{3}% - \TestAdd{4}{-1}{3}% - \TestAdd{1}{-4}{-3}% - \TestAdd{-4}{-1}{-5}% - \TestAdd{-1}{-4}{-5}% - \TestAdd{ -4 }{ -1 }{-5}% - \TestAdd{ -1 }{ -4 }{-5}% - \TestAdd{ -4 }{ 1 }{-3}% - \TestAdd{ -1 }{ 4 }{3}% - \TestAdd{ 4 }{ -1 }{3}% - \TestAdd{ 1 }{ -4 }{-3}% - \TestAdd{ -4 }{ -1 }{-5}% - \TestAdd{ -1 }{ -4 }{-5}% - \TestAdd{876543210}{111111111}{987654321}% - \TestAdd{999999999}{2}{1000000001}% -\end{qstest} - -\begin{qstest}{sub}{sub} - \TestSub{0}{0}{0}% - \TestSub{1}{0}{1}% - \TestSub{1}{2}{-1}% - \TestSub{-1}{-1}{0}% - \TestSub{2147483646}{-1}{2147483647}% - \TestSub{-2147483647}{-2147483647}{0}% - \TestSub{-4}{-1}{-3}% - \TestSub{-1}{-4}{3}% - \TestSub{-4}{1}{-5}% - \TestSub{-1}{4}{-5}% - \TestSub{4}{-1}{5}% - \TestSub{1}{-4}{5}% - \TestSub{-4}{-1}{-3}% - \TestSub{-1}{-4}{3}% - \TestSub{ -4 }{ -1 }{-3}% - \TestSub{ -1 }{ -4 }{3}% - \TestSub{ -4 }{ 1 }{-5}% - \TestSub{ -1 }{ 4 }{-5}% - \TestSub{ 4 }{ -1 }{5}% - \TestSub{ 1 }{ -4 }{5}% - \TestSub{ -4 }{ -1 }{-3}% - \TestSub{ -1 }{ -4 }{3}% - \TestSub{1000000000}{2}{999999998}% - \TestSub{987654321}{111111111}{876543210}% -\end{qstest} - -\begin{qstest}{shl}{shl} - \TestShl{0}{0}% - \TestShl{1}{2}% - \TestShl{2}{4}% - \TestShl{5621}{11242}% - \TestShl{1073741823}{2147483646}% -\end{qstest} - -\begin{qstest}{shr}{shr} - \TestShr{0}{0}% - \TestShr{1}{0}% - \TestShr{2}{1}% - \TestShr{3}{1}% - \TestShr{4}{2}% - \TestShr{5}{2}% - \TestShr{6}{3}% - \TestShr{7}{3}% - \TestShr{8}{4}% - \TestShr{9}{4}% - \TestShr{10}{5}% - \TestShr{11}{5}% - \TestShr{12}{6}% - \TestShr{13}{6}% - \TestShr{14}{7}% - \TestShr{15}{7}% - \TestShr{16}{8}% - \TestShr{17}{8}% - \TestShr{18}{9}% - \TestShr{19}{9}% - \TestShr{20}{10}% - \TestShr{21}{10}% - \TestShr{22}{11}% - \TestShr{11241}{5620}% - \TestShr{73054202}{36527101}% - \TestShr{2147483646}{1073741823}% -\end{qstest} - -\begin{qstest}{mul}{mul} - \TestMul{0}{0}{0}% - \TestMul{1}{0}{0}% - \TestMul{0}{1}{0}% - \TestMul{1}{1}{1}% - \TestMul{3}{1}{3}% - \TestMul{1}{-3}{-3}% - \TestMul{-4}{-5}{20}% - \TestMul{3}{7}{21}% - \TestMul{7}{3}{21}% - \TestMul{3}{-7}{-21}% - \TestMul{7}{-3}{-21}% - \TestMul{-3}{7}{-21}% - \TestMul{-7}{3}{-21}% - \TestMul{-3}{-7}{21}% - \TestMul{-7}{-3}{21}% - \TestMul{12}{11}{132}% - \TestMul{999}{333}{332667}% - \TestMul{1000}{4321}{4321000}% - \TestMul{12345}{173955}{2147474475}% - \TestMul{1073741823}{2}{2147483646}% - \TestMul{2}{1073741823}{2147483646}% - \TestMul{-1073741823}{2}{-2147483646}% - \TestMul{2}{-1073741823}{-2147483646}% - \TestMul{6706022400}{13}{87178291200}% -\end{qstest} - -\begin{qstest}{sqr}{sqr} - \TestSqr{0}{0}% - \TestSqr{1}{1}% - \TestSqr{2}{4}% - \TestSqr{3}{9}% - \TestSqr{4}{16}% - \TestSqr{9}{81}% - \TestSqr{10}{100}% - \TestSqr{46340}{2147395600}% - \TestSqr{-1}{1}% - \TestSqr{-2}{4}% - \TestSqr{-46340}{2147395600}% -\end{qstest} - -\begin{qstest}{fac}{fac} - \TestFac{0}{1}% - \TestFac{1}{1}% - \TestFac{2}{2}% - \TestFac{3}{2*3}% - \TestFac{4}{2*3*4}% - \TestFac{5}{2*3*4*5}% - \TestFac{6}{2*3*4*5*6}% - \TestFac{7}{2*3*4*5*6*7}% - \TestFac{8}{2*3*4*5*6*7*8}% - \TestFac{9}{2*3*4*5*6*7*8*9}% - \TestFac{10}{2*3*4*5*6*7*8*9*10}% - \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% - \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% - \TestFacBig{13}{6227020800}% - \TestFacBig{14}{87178291200}% - \TestFacBig{15}{1307674368000}% - \TestFacBig{16}{20922789888000}% - \TestFacBig{17}{355687428096000}% - \TestFacBig{18}{6402373705728000}% - \TestFacBig{19}{121645100408832000}% - \TestFacBig{20}{2432902008176640000}% - \TestFacBig{21}{51090942171709440000}% - \TestFacBig{22}{1124000727777607680000}% -\end{qstest} - -\begin{qstest}{pow}{pow} - \TestPow{-2}{0}{1}% - \TestPow{-1}{0}{1}% - \TestPow{0}{0}{1}% - \TestPow{1}{0}{1}% - \TestPow{2}{0}{1}% - \TestPow{3}{0}{1}% - \TestPow{-2}{1}{-2}% - \TestPow{-1}{1}{-1}% - \TestPow{1}{1}{1}% - \TestPow{2}{1}{2}% - \TestPow{3}{1}{3}% - \TestPow{-2}{2}{4}% - \TestPow{-1}{2}{1}% - \TestPow{0}{2}{0}% - \TestPow{1}{2}{1}% - \TestPow{2}{2}{4}% - \TestPow{3}{2}{9}% - \TestPow{0}{1}{0}% - \TestPow{1}{-2}{1}% - \TestPow{1}{-1}{1}% - \TestPow{-1}{-2}{1}% - \TestPow{-1}{-1}{-1}% - \TestPow{-1}{3}{-1}% - \TestPow{-1}{4}{1}% - \TestPow{-2}{-1}{0}% - \TestPow{-2}{-2}{0}% - \TestPow{2}{3}{8}% - \TestPow{2}{4}{16}% - \TestPow{2}{5}{32}% - \TestPow{2}{6}{64}% - \TestPow{2}{7}{128}% - \TestPow{2}{8}{256}% - \TestPow{2}{9}{512}% - \TestPow{2}{10}{1024}% - \TestPow{-2}{3}{-8}% - \TestPow{-2}{4}{16}% - \TestPow{-2}{5}{-32}% - \TestPow{-2}{6}{64}% - \TestPow{-2}{7}{-128}% - \TestPow{-2}{8}{256}% - \TestPow{-2}{9}{-512}% - \TestPow{-2}{10}{1024}% - \TestPow{3}{3}{27}% - \TestPow{3}{4}{81}% - \TestPow{3}{5}{243}% - \TestPow{-3}{3}{-27}% - \TestPow{-3}{4}{81}% - \TestPow{-3}{5}{-243}% - \TestPow{2}{30}{1073741824}% - \TestPow{-3}{19}{-1162261467}% - \TestPow{5}{13}{1220703125}% - \TestPow{-7}{11}{-1977326743}% -\end{qstest} - -\begin{qstest}{div}{div} - \TestDiv{1}{1}{1}% - \TestDiv{2}{1}{2}% - \TestDiv{-2}{1}{-2}% - \TestDiv{2}{-1}{-2}% - \TestDiv{-2}{-1}{2}% - \TestDiv{15}{2}{7}% - \TestDiv{-16}{2}{-8}% - \TestDiv{1}{2}{0}% - \TestDiv{1}{3}{0}% - \TestDiv{2}{3}{0}% - \TestDiv{-2}{3}{0}% - \TestDiv{2}{-3}{0}% - \TestDiv{-2}{-3}{0}% - \TestDiv{13}{3}{4}% - \TestDiv{-13}{-3}{4}% - \TestDiv{-13}{3}{-4}% - \TestDiv{-6}{5}{-1}% - \TestDiv{-5}{5}{-1}% - \TestDiv{-4}{5}{0}% - \TestDiv{-3}{5}{0}% - \TestDiv{-2}{5}{0}% - \TestDiv{-1}{5}{0}% - \TestDiv{0}{5}{0}% - \TestDiv{1}{5}{0}% - \TestDiv{2}{5}{0}% - \TestDiv{3}{5}{0}% - \TestDiv{4}{5}{0}% - \TestDiv{5}{5}{1}% - \TestDiv{6}{5}{1}% - \TestDiv{-5}{4}{-1}% - \TestDiv{-4}{4}{-1}% - \TestDiv{-3}{4}{0}% - \TestDiv{-2}{4}{0}% - \TestDiv{-1}{4}{0}% - \TestDiv{0}{4}{0}% - \TestDiv{1}{4}{0}% - \TestDiv{2}{4}{0}% - \TestDiv{3}{4}{0}% - \TestDiv{4}{4}{1}% - \TestDiv{5}{4}{1}% - \TestDiv{12345}{678}{18}% - \TestDiv{32372}{5952}{5}% - \TestDiv{284271294}{18162}{15651}% - \TestDiv{217652429}{12561}{17327}% - \TestDiv{462028434}{5439}{84947}% - \TestDiv{2147483647}{1000}{2147483}% - \TestDiv{2147483647}{-1000}{-2147483}% - \TestDiv{-2147483647}{1000}{-2147483}% - \TestDiv{-2147483647}{-1000}{2147483}% - \TestDiv{0}{3}{0}% - \TestDiv{1}{3}{0}% - \TestDiv{2}{3}{0}% - \TestDiv{3}{3}{1}% - \TestDiv{4}{3}{1}% - \TestDiv{5}{3}{1}% - \TestDiv{6}{3}{2}% - \TestDiv{7}{3}{2}% - \TestDiv{8}{3}{2}% - \TestDiv{9}{3}{3}% - \TestDiv{10}{3}{3}% - \TestDiv{11}{3}{3}% - \TestDiv{12}{3}{4}% - \TestDiv{13}{3}{4}% - \TestDiv{14}{3}{4}% - \TestDiv{15}{3}{5}% - \TestDiv{16}{3}{5}% - \TestDiv{17}{3}{5}% - \TestDiv{18}{3}{6}% - \TestDiv{19}{3}{6}% - \TestDiv{20}{3}{6}% - \TestDiv{21}{3}{7}% - \TestDiv{22}{3}{7}% - \TestDiv{23}{3}{7}% - \TestDiv{24}{3}{8}% - \TestDiv{25}{3}{8}% - \TestDiv{26}{3}{8}% - \TestDiv{27}{3}{9}% - \TestDiv{28}{3}{9}% - \TestDiv{29}{3}{9}% - \TestDiv{30}{3}{10}% - \TestDiv{31}{3}{10}% - \TestDivBig{17363436332507}{24702}{702916214}% -\end{qstest} - -\begin{qstest}{mod}{mod} - \TestMod{-6}{5}{4}% - \TestMod{-5}{5}{0}% - \TestMod{-4}{5}{1}% - \TestMod{-3}{5}{2}% - \TestMod{-2}{5}{3}% - \TestMod{-1}{5}{4}% - \TestMod{0}{5}{0}% - \TestMod{1}{5}{1}% - \TestMod{2}{5}{2}% - \TestMod{3}{5}{3}% - \TestMod{4}{5}{4}% - \TestMod{5}{5}{0}% - \TestMod{6}{5}{1}% - \TestMod{-5}{4}{3}% - \TestMod{-4}{4}{0}% - \TestMod{-3}{4}{1}% - \TestMod{-2}{4}{2}% - \TestMod{-1}{4}{3}% - \TestMod{0}{4}{0}% - \TestMod{1}{4}{1}% - \TestMod{2}{4}{2}% - \TestMod{3}{4}{3}% - \TestMod{4}{4}{0}% - \TestMod{5}{4}{1}% - \TestMod{-6}{-5}{-1}% - \TestMod{-5}{-5}{0}% - \TestMod{-4}{-5}{-4}% - \TestMod{-3}{-5}{-3}% - \TestMod{-2}{-5}{-2}% - \TestMod{-1}{-5}{-1}% - \TestMod{0}{-5}{0}% - \TestMod{1}{-5}{-4}% - \TestMod{2}{-5}{-3}% - \TestMod{3}{-5}{-2}% - \TestMod{4}{-5}{-1}% - \TestMod{5}{-5}{0}% - \TestMod{6}{-5}{-4}% - \TestMod{-5}{-4}{-1}% - \TestMod{-4}{-4}{0}% - \TestMod{-3}{-4}{-3}% - \TestMod{-2}{-4}{-2}% - \TestMod{-1}{-4}{-1}% - \TestMod{0}{-4}{0}% - \TestMod{1}{-4}{-3}% - \TestMod{2}{-4}{-2}% - \TestMod{3}{-4}{-1}% - \TestMod{4}{-4}{0}% - \TestMod{5}{-4}{-3}% - \TestMod{2147483647}{1000}{647}% - \TestMod{2147483647}{-1000}{-353}% - \TestMod{-2147483647}{1000}{353}% - \TestMod{-2147483647}{-1000}{-647}% - \TestMod{ 0 }{ 4 }{0}% - \TestMod{ 1 }{ 4 }{1}% - \TestMod{ -1 }{ 4 }{3}% - \TestMod{ 0 }{ -4 }{0}% - \TestMod{ 1 }{ -4 }{-3}% - \TestMod{ -1 }{ -4 }{-1}% - \TestMod{18362}{25}{12}% -\end{qstest} - -\newcommand*{\TestError}[2]{% - \begingroup - \expandafter\def\csname BigIntCalcError:#1\endcsname{}% - \Expect*{#2}{0}% - \expandafter\def\csname BigIntCalcError:#1\endcsname{ERROR}% - \Expect*{#2}{0ERROR}% - \endgroup -} -\begin{qstest}{error}{error} - \TestError{FacNegative}{\bigintcalcFac{-1}}% - \TestError{FacNegative}{\bigintcalcFac{-2147483647}}% - \TestError{DivisionByZero}{\bigintcalcPow{0}{-1}}% - \TestError{DivisionByZero}{\bigintcalcDiv{1}{0}}% - \TestError{DivisionByZero}{\bigintcalcMod{1}{0}}% -\end{qstest} - -\begin{document} -\end{document} -%</test2> -% \end{macrocode} -% -% \section{Installation} +%% \section{Installation} % % \subsection{Download} % @@ -4369,9 +3422,6 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}% % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % bigintcalc.sty & tex/generic/oberdiek/bigintcalc.sty\\ % bigintcalc.pdf & doc/latex/oberdiek/bigintcalc.pdf\\ -% test/bigintcalc-test1.tex & doc/latex/oberdiek/test/bigintcalc-test1.tex\\ -% test/bigintcalc-test2.tex & doc/latex/oberdiek/test/bigintcalc-test2.tex\\ -% test/bigintcalc-test3.tex & doc/latex/oberdiek/test/bigintcalc-test3.tex\\ % bigintcalc.dtx & source/latex/oberdiek/bigintcalc.dtx\\ % \end{tabular}^^A % }^^A |