diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintcore.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcore.sty | 73 |
1 files changed, 10 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty index 91702aed00a..9ffd58c266a 100644 --- a/Master/texmf-dist/tex/generic/xint/xintcore.sty +++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.4l 2022/05/29 +%% The xint bundle 1.4m 2022/06/10 %% Copyright (C) 2013-2022 by Jean-Francois Burnol %% xintcore: Expandable arithmetic on big integers %% --------------------------------------------------------------- @@ -40,7 +40,7 @@ \expandafter\let\expandafter\x\csname ver@xintcore.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintkernel.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintcore Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -68,7 +68,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcore}% - [2022/05/29 v1.4l Expandable arithmetic on big integers (JFB)]% + [2022/06/10 v1.4m Expandable arithmetic on big integers (JFB)]% \csname XINT_Clamped_istrapped\endcsname \csname XINT_ConversionSyntax_istrapped\endcsname \csname XINT_DivisionByZero_istrapped\endcsname @@ -88,7 +88,7 @@ \xint_dothis{\csname XINT_#1-signal\endcsname}% \fi\xint_orthat{{#1}}{#1}}% \def\XINT_signalcondition_a #1#2#3#4#5{% copied over from Python Decimal module - \ifcsname XINT_#1_isignoredflag\endcsname +\ifcsname XINT_#1_isignoredflag\endcsname \xint_dothis{\csname XINT_#1.handler\endcsname {#4}}% \fi \expandafter\xint_gobble_i\csname XINT_#1Flag_ON\endcsname @@ -100,7 +100,7 @@ % #2 \XINT_expandableerror{#3}% % not for X3.274 - %\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% + % \XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% \xint_firstofone{#5}% }% }% @@ -294,7 +294,7 @@ *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax}% \def\XINT_half_fork #1% {% - \xint_UDsignfork + \xint_UDsignfork #1\XINT_half_neg -\XINT_half \krof #1% @@ -745,64 +745,11 @@ \def\XINT_cmp_minusplus #1\xint:#2\xint:{ -1}% \def\XINT_cmp_minusminus --{\expandafter\XINT_opp\romannumeral0\XINT_cmp_plusplus {}{}}% -\def\XINT_cmp_plusplus #1#2#3\xint: -{% - \expandafter\XINT_cmp_pp - \the\numexpr\expandafter\XINT_sepbyviii_andcount - \romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W - #2#3\XINT_sepbyviii_end 2345678\relax - \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!% - \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W - #1% -}% -\def\XINT_cmp_pp #1\xint:#2\xint:#3\xint: -{% - \expandafter\XINT_cmp_checklengths - \the\numexpr #2\expandafter\xint:% - \the\numexpr\expandafter\XINT_sepbyviii_andcount - \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W - #3\XINT_sepbyviii_end 2345678\relax - \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!% - \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W - #1;!1;!1;!1;!\W -}% -\def\XINT_cmp_checklengths #1\xint:#2\xint:#3\xint: -{% - \ifnum #1=#3 - \expandafter\xint_firstoftwo - \else - \expandafter\xint_secondoftwo - \fi - \XINT_cmp_a {\XINT_cmp_distinctlengths {#1}{#3}}#2;!1;!1;!1;!\W +\def\XINT_cmp_plusplus #1#2#3\xint:#4\xint:{\expanded{ % + \ifcase\expandafter\XINT_cntSgn\the\numexpr\xintLength{#1#4}-\xintLength{#2#3}\xint: + \xintstrcmp{#1#4}{#2#3}\or1\else-1\fi + }% }% -\def\XINT_cmp_distinctlengths #1#2#3\W #4\W -{% - \ifnum #1>#2 - \expandafter\xint_firstoftwo - \else - \expandafter\xint_secondoftwo - \fi - { -1}{ 1}% -}% -\def\XINT_cmp_a 1#1!1#2!1#3!1#4!#5\W 1#6!1#7!1#8!1#9!% -{% - \xint_gob_til_sc #1\XINT_cmp_equal ;% - \ifnum #1>#6 \XINT_cmp_gt\fi - \ifnum #1<#6 \XINT_cmp_lt\fi - \xint_gob_til_sc #2\XINT_cmp_equal ;% - \ifnum #2>#7 \XINT_cmp_gt\fi - \ifnum #2<#7 \XINT_cmp_lt\fi - \xint_gob_til_sc #3\XINT_cmp_equal ;% - \ifnum #3>#8 \XINT_cmp_gt\fi - \ifnum #3<#8 \XINT_cmp_lt\fi - \xint_gob_til_sc #4\XINT_cmp_equal ;% - \ifnum #4>#9 \XINT_cmp_gt\fi - \ifnum #4<#9 \XINT_cmp_lt\fi - \XINT_cmp_a #5\W -}% -\def\XINT_cmp_lt#1{\def\XINT_cmp_lt\fi ##1\W ##2\W {\fi#1-1}}\XINT_cmp_lt{ }% -\def\XINT_cmp_gt#1{\def\XINT_cmp_gt\fi ##1\W ##2\W {\fi#11}}\XINT_cmp_gt{ }% -\def\XINT_cmp_equal #1\W #2\W { 0}% \def\xintiiSub {\romannumeral0\xintiisub }% \def\xintiisub #1{\expandafter\XINT_iisub\romannumeral`&&@#1\xint:}% \def\XINT_iisub #1#2\xint:#3% |