%% %% This is file `xintseries.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% xint.dtx (with options: `xintseries') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from xintseries.sty. %% %% For distribution of the original source see the terms %% for copying and modification in the file xint.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% %%---------------------------------------------------------------- %% The xint bundle (version 1.05a of May 2nd, 2013) %% xintseries: Expandable partial sums with xint package %% Copyright (C) 2013 by Jean-Francois Burnol %%---------------------------------------------------------------- %% \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M \endlinechar=13 % \catcode123=1 % { \catcode125=2 % } \catcode64=11 % @ \catcode35=6 % # \catcode44=12 % , \catcode45=12 % - \catcode46=12 % . \catcode58=12 % : \def\space { }% \let\z\endgroup \expandafter\let\expandafter\x\csname ver@xintseries.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname \expandafter \ifx\csname PackageInfo\endcsname\relax \def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}% \else \def\y#1#2{\PackageInfo{#1}{#2}}% \fi \expandafter \ifx\csname numexpr\endcsname\relax \y{xintseries}{\numexpr not available, aborting input}% \aftergroup\endinput \else \ifx\x\relax % plain-TeX, first loading of xintseries.sty \ifx\w\relax % but xintfrac.sty not yet loaded. \y{xintseries}{Package xintfrac is required}% \y{xintseries}{Will try \string\input\space xintfrac.sty}% \def\z{\endgroup\input xintfrac.sty\relax}% \fi \else \def\empty {}% \ifx\x\empty % LaTeX, first loading, % variable is initialized, but \ProvidesPackage not yet seen \ifx\w\relax % xintfrac.sty not yet loaded. \y{xintseries}{Package xintfrac is required}% \y{xintseries}{Will try \string\RequirePackage{xintfrac}}% \def\z{\endgroup\RequirePackage{xintfrac}}% \fi \else \y{xintseries}{I was already loaded, aborting input}% \aftergroup\endinput \fi \fi \fi \z% \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M \endlinechar=13 % \catcode123=1 % { \catcode125=2 % } \catcode64=11 % @ \catcode35=6 % # \catcode44=12 % , \catcode45=12 % - \catcode46=12 % . \catcode58=12 % : \expandafter \ifx\csname PackageInfo\endcsname\relax \def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}% \else \def\y#1#2{\PackageInfo{#1}{#2}}% \fi \def\empty {}% \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname \ifx\w\relax % Plain TeX, user gave a file name at the prompt \y{xintseries}{Loading of package xintfrac failed, aborting input}% \aftergroup\endinput \fi \ifx\w\empty % LaTeX, user gave a file name at the prompt \y{xintseries}{Loading of package xintfrac failed, aborting input}% \aftergroup\endinput \fi \endgroup% \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M \endlinechar=13 % \catcode123=1 % { \catcode125=2 % } \catcode64=11 % @ \def\x {% \endgroup \edef\XINT@series@restorecatcodes@endinput {% \catcode93=\the\catcode93 % ] \catcode91=\the\catcode91 % [ \catcode47=\the\catcode47 % / \catcode41=\the\catcode41 % ) \catcode40=\the\catcode40 % ( \catcode42=\the\catcode42 % * \catcode43=\the\catcode43 % + \catcode62=\the\catcode62 % > \catcode60=\the\catcode60 % < \catcode58=\the\catcode58 % : \catcode46=\the\catcode46 % . \catcode45=\the\catcode45 % - \catcode44=\the\catcode44 % , \catcode35=\the\catcode35 % # \catcode64=\the\catcode64 % @ \catcode125=\the\catcode125 % } \catcode123=\the\catcode123 % { \endlinechar=\the\endlinechar \catcode13=\the\catcode13 % ^^M \catcode32=\the\catcode32 % \catcode61=\the\catcode61\relax % = \noexpand\endinput }% \XINT@setcatcodes \catcode91=12 % [ \catcode93=12 % ] }% \x \begingroup \catcode58=12 % : \expandafter\ifx\csname ProvidesPackage\endcsname\relax \def\x#1#2#3[#4]{\endgroup \immediate\write-1{Package: #3 #4}% \xdef#1{#4}% }% \else \def\x#1#2[#3]{\endgroup #2[{#3}]% \ifx#1\@undefined \xdef#1{#3}% \fi \ifx#1\relax \xdef#1{#3}% \fi }% \fi \expandafter\x\csname ver@xintseries.sty\endcsname \ProvidesPackage{xintseries}% [2013/05/02 v1.05a Expandable partial sums with xint package (jfB)]% \def\xintSeries {\romannumeral0\xintseries }% \def\xintseries #1#2% {% \expandafter\expandafter\expandafter \XINT@series@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@series@i #1#2% {% \expandafter\expandafter\expandafter \XINT@series@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@series@ii #1#2#3% {% \ifnum #2<#1 \xint@afterfi { 0[0]}% \else \xint@afterfi {\XINT@series@loop {#1}{0}{#2}{#3}}% \fi }% \def\XINT@series@loop #1#2#3#4% {% \ifnum #3>#1 \else \XINT@series@exit \fi \expandafter\XINT@series@loop\expandafter {\the\numexpr #1+1\expandafter }\expandafter {\romannumeral0\xintadd {#2}{#4{#1}}}% {#3}{#4}% }% \def\XINT@series@exit \fi #1#2#3#4#5#6#7#8% {% \fi\xint@gobble@two #6% }% \def\xintiSeries {\romannumeral0\xintiseries }% \def\xintiseries #1#2% {% \expandafter\expandafter\expandafter \XINT@iseries@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@iseries@i #1#2% {% \expandafter\expandafter\expandafter \XINT@iseries@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@iseries@ii #1#2#3% {% \ifnum #2<#1 \xint@afterfi { 0}% \else \xint@afterfi {\XINT@iseries@loop {#1}{0}{#2}{#3}}% \fi }% \def\XINT@iseries@loop #1#2#3#4% {% \ifnum #3>#1 \else \XINT@iseries@exit \fi \expandafter\XINT@iseries@loop\expandafter {\the\numexpr #1+1\expandafter }\expandafter {\romannumeral0\xintiadd {#2}{#4{#1}}}% {#3}{#4}% }% \def\XINT@iseries@exit \fi #1#2#3#4#5#6#7#8% {% \fi\xint@gobble@two #6% }% \def\xintPowerSeries {\romannumeral0\xintpowerseries }% \def\xintpowerseries #1#2% {% \expandafter\expandafter\expandafter \XINT@powseries@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@powseries@i #1#2% {% \expandafter\expandafter\expandafter \XINT@powseries@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@powseries@ii #1#2#3#4% {% \ifnum #2<#1 \xint@afterfi { 0[0]}% \else \xint@afterfi {\XINT@powseries@loop@i {#3{#2}}{#1}{#2}{#3}{#4}}% \fi }% \def\XINT@powseries@loop@i #1#2#3#4#5% {% \ifnum #3>#2 \else\XINT@powseries@exit@i\fi \expandafter\XINT@powseries@loop@ii\expandafter {\the\numexpr #3-1\expandafter}\expandafter {\romannumeral0\xintmul {#1}{#5}}{#2}{#4}{#5}% }% \def\XINT@powseries@loop@ii #1#2#3#4% {% \expandafter\XINT@powseries@loop@i\expandafter {\romannumeral0\xintadd {#4{#1}}{#2}}{#3}{#1}{#4}% }% \def\XINT@powseries@exit@i\fi #1#2#3#4#5#6#7#8#9% {% \fi \XINT@powseries@exit@ii #6{#7}% }% \def\XINT@powseries@exit@ii #1#2#3#4#5#6% {% \xintmul{\xintPow {#5}{#6}}{#4}% }% \def\xintPowerSeriesX {\romannumeral0\xintpowerseriesx }% \def\xintpowerseriesx #1#2% {% \expandafter\expandafter\expandafter \XINT@powseriesx@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@powseriesx@i #1#2% {% \expandafter\expandafter\expandafter \XINT@powseriesx@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@powseriesx@ii #1#2#3#4% {% \ifnum #2<#1 \xint@afterfi { 0[0]}% \else \xint@afterfi {\expandafter\expandafter\expandafter\XINT@powseriesx@pre \expandafter\expandafter\expandafter {#4}{#1}{#2}{#3}}% \fi }% \def\XINT@powseriesx@pre #1#2#3#4% {% \XINT@powseries@loop@i {#4{#3}}{#2}{#3}{#4}{#1}% }% \def\xintRationalSeries {\romannumeral0\xintratseries }% \def\xintratseries #1#2% {% \expandafter\expandafter\expandafter \XINT@ratseries@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@ratseries@i #1#2% {% \expandafter\expandafter\expandafter \XINT@ratseries@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@ratseries@ii #1#2#3#4% {% \ifnum #2<#1 \xint@afterfi { 0[0]}% \else \xint@afterfi {\XINT@ratseries@loop {#2}{1}{#1}{#4}{#3}}% \fi }% \def\XINT@ratseries@loop #1#2#3#4% {% \ifnum #1>#3 \else\XINT@ratseries@exit@i\fi \expandafter\XINT@ratseries@loop\expandafter {\the\numexpr #1-1\expandafter}\expandafter {\romannumeral0\xintadd {1}{\xintMul {#2}{#4{#1}}}}{#3}{#4}% }% \def\XINT@ratseries@exit@i\fi #1#2#3#4#5#6#7#8% {% \fi \XINT@ratseries@exit@ii #6% }% \def\XINT@ratseries@exit@ii #1#2#3#4#5% {% \XINT@ratseries@exit@iii #5% }% \def\XINT@ratseries@exit@iii #1#2#3#4% {% \xintmul{#2}{#4}% }% \def\xintRationalSeriesX {\romannumeral0\xintratseriesx }% \def\xintratseriesx #1#2% {% \expandafter\expandafter\expandafter \XINT@ratseriesx@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@ratseriesx@i #1#2% {% \expandafter\expandafter\expandafter \XINT@ratseriesx@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@ratseriesx@ii #1#2#3#4#5% {% \ifnum #2<#1 \xint@afterfi { 0[0]}% \else \xint@afterfi {\expandafter\expandafter\expandafter\XINT@ratseriesx@pre \expandafter\expandafter\expandafter {#5}{#2}{#1}{#4}{#3}}% \fi }% \def\XINT@ratseriesx@pre #1#2#3#4#5% {% \XINT@ratseries@loop {#2}{1}{#3}{#4{#1}}{#5{#1}}% }% \def\xintFxPtPowerSeries {\romannumeral0\xintfxptpowerseries }% \def\xintfxptpowerseries #1#2% {% \expandafter\expandafter\expandafter \XINT@fppowseries@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@fppowseries@i #1#2% {% \expandafter\expandafter\expandafter \XINT@fppowseries@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@fppowseries@ii #1#2#3#4#5% {% \ifnum #2<#1 \xint@afterfi { 0}% \else \xint@afterfi {\expandafter\XINT@fppowseries@loop@pre\expandafter {\romannumeral0\xinttrunc {#5}{\xintPow {#4}{#1}}}% {#1}{#4}{#2}{#3}{#5}% }% \fi }% \def\XINT@fppowseries@loop@pre #1#2#3#4#5#6% {% \ifnum #4>#2 \else\XINT@fppowseries@dont@i \fi \expandafter\XINT@fppowseries@loop@i\expandafter {\the\numexpr #2+1\expandafter}\expandafter {\romannumeral0\xintitrunc {#6}{\xintMul {#5{#2}}{#1}}}% {#1}{#3}{#4}{#5}{#6}% }% \def\XINT@fppowseries@dont@i \fi\expandafter\XINT@fppowseries@loop@i {\fi \expandafter\XINT@fppowseries@dont@ii }% \def\XINT@fppowseries@dont@ii #1#2#3#4#5#6#7{\xinttrunc {#7}{#2[-#7]}}% \def\XINT@fppowseries@loop@i #1#2#3#4#5#6#7% {% \ifnum #5>#1 \else \XINT@fppowseries@exit@i \fi \expandafter\XINT@fppowseries@loop@ii\expandafter {\romannumeral0\xinttrunc {#7}{\xintMul {#3}{#4}}}% {#1}{#4}{#2}{#5}{#6}{#7}% }% \def\XINT@fppowseries@loop@ii #1#2#3#4#5#6#7% {% \expandafter\XINT@fppowseries@loop@i\expandafter {\the\numexpr #2+1\expandafter}\expandafter {\romannumeral0\xintiadd {#4}{\xintiTrunc {#7}{\xintMul {#6{#2}}{#1}}}}% {#1}{#3}{#5}{#6}{#7}% }% \def\XINT@fppowseries@exit@i\fi\expandafter\XINT@fppowseries@loop@ii {\fi \expandafter\XINT@fppowseries@exit@ii }% \def\XINT@fppowseries@exit@ii #1#2#3#4#5#6#7% {% \xinttrunc {#7} {\xintiAdd {#4}{\xintiTrunc {#7}{\xintMul {#6{#2}}{#1}}}[-#7]}% }% \def\xintFxPtPowerSeriesX {\romannumeral0\xintfxptpowerseriesx }% \def\xintfxptpowerseriesx #1#2% {% \expandafter\expandafter\expandafter \XINT@fppowseriesx@i \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@fppowseriesx@i #1#2% {% \expandafter\expandafter\expandafter \XINT@fppowseriesx@ii \expandafter\expandafter\expandafter {#2}{#1}% }% \def\XINT@fppowseriesx@ii #1#2#3#4#5% {% \ifnum #2<#1 \xint@afterfi { 0}% \else \xint@afterfi {\expandafter\expandafter\expandafter \XINT@fppowseriesx@pre \expandafter\expandafter\expandafter {#4}{#1}{#2}{#3}{#5}% }% \fi }% \def\XINT@fppowseriesx@pre #1#2#3#4#5% {% \expandafter\XINT@fppowseries@loop@pre\expandafter {\romannumeral0\xinttrunc {#5}{\xintPow {#1}{#2}}}% {#2}{#1}{#3}{#4}{#5}% }% \XINT@series@restorecatcodes@endinput% \endinput %% %% End of file `xintseries.sty'.