summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintcore.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintcore.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcore.sty22
1 files changed, 17 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty
index 1c119449588..c6a06b1a974 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 v1.2a 2015/10/19
+%% The xint bundle v1.2b 2015/10/29
%% Copyright (C) 2013-2015 by Jean-Francois Burnol
%% xintcore: Expandable arithmetic on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2015/10/19 v1.2a Expandable arithmetic on big integers (jfB)]%
+ [2015/10/29 v1.2b Expandable arithmetic on big integers (jfB)]%
\ifdefined\m@ne\let\xint_c_mone\m@ne
\else\csname newcount\endcsname\xint_c_mone \xint_c_mone -1 \fi
\newcount\xint_c_x^viii \xint_c_x^viii 100000000
@@ -1718,9 +1718,22 @@
}%
\def\XINT_div_II_c #1#2#3#4%
{%
- \expandafter\XINT_div_II_d\the\numexpr\XINT_div_mini
+ \expandafter\XINT_div_II_d\the\numexpr\XINT_div_xmini
#1.#2!#3!#4!{#1}{#2}#3!#4!%
}%
+\def\XINT_div_xmini #1%
+{%
+ \xint_gob_til_one #1\XINT_div_xmini_a 1\XINT_div_mini #1%
+}%
+\def\XINT_div_xmini_a 1\XINT_div_mini 1#1%
+{%
+ \xint_gob_til_zero #1\XINT_div_xmini_b 0\XINT_div_mini 1#1%
+}%
+\def\XINT_div_xmini_b 0\XINT_div_mini 10#1#2#3#4#5#6#7%
+{%
+ \xint_gob_til_zero #7\XINT_div_xmini_c 0\XINT_div_mini 10#1#2#3#4#5#6#7%
+}%
+\def\XINT_div_xmini_c 0\XINT_div_mini 100000000.50000000!#1!#2!{#1!}%
\def\XINT_div_II_d 1#1#2#3#4#5!#6#7#8.#9%
{%
\expandafter\XINT_div_II_e
@@ -1744,7 +1757,7 @@
}%
\def\XINT_div_II_fa #1#2#3#4%
{%
- \expandafter\XINT_div_II_g \the\numexpr\XINT_div_mini #3.#4!#1{#2}%
+ \expandafter\XINT_div_II_g \the\numexpr\XINT_div_xmini #3.#4!#1{#2}%
}%
\def\XINT_div_II_g 1#1#2#3#4#5!#6#7#8%
{%
@@ -1958,7 +1971,6 @@
{%
\expandafter\XINT_smalldiv_d\the\numexpr #2-#1*#4!#3.#4!%
}%
-%%%%%%%%%%%%
\def\XINT_div_mini #1.#2!1#3!%
{%
\expandafter\XINT_div_mini_a\the\numexpr