%%
%% This is file `minifp.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% minifp.dtx  (with options: `sty')
%% 
%% -------------------------------------------------------------------
%% 
%% Copyright 2008--2010, Daniel H. Luecking
%% 
%% Minifp may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3b of this license or (at
%% your option) any later version. The latest version of this license is in
%%    <http://www.latex-project.org/lppl.txt>
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2008/12/01 or later.
%% 
%% Minifp has maintenance status "author-maintained". The Current Maintainer
%% is Daniel H. Luecking. The Base Interpreters associated
%% with minifp are plain TeX and LaTeX.
%% 
\def\MFPfiledate{2013/12/30}%
\def\MFPfileversion{0.96}%
\expandafter
\ifx \csname MFP@finish\endcsname\relax
\else \expandafter\endinput \fi
\expandafter\edef\csname MFP@finish\endcsname{%
  \catcode64=\the\catcode64 \space
  \catcode46=\the\catcode46 \space
  \catcode60=\the\catcode60 \space
  \catcode62=\the\catcode62 \space}%
\ifx\ProvidesPackage\UndEfInEd
  \newlinechar`\^^J%
  \message{%
      Package minifp: \MFPfiledate\space v\MFPfileversion. %
      Macros for real number operations %
      ^^Jand a stack-based programing language.^^J}%
\else
  \ProvidesPackage{minifp}[\MFPfiledate\space v\MFPfileversion. %
      Macros for real number operations %
      and a stack-based programing language.]%
  \DeclareOption{extra}{\def\MFPextra{}}%
  \ProcessOptions\relax
\fi
\catcode64=11
\ifx\MFPextra\UndEfInEd
  \def\MFP@loadextra{}%
\else
  \def\MFP@loadextra{\input mfpextra\relax}%
\fi
\def\MFPloadextra{\input mfpextra\relax}%
\catcode46=12
\catcode60=12
\catcode62=12
\long\def\gobbleto@MFP@end#1\MFP@end{}%
\def\MFP@end{\@empty}%
\ifx\documentclass\UndEfInEd
  \def\MFP@ifnoLaTeX{}%
\else
  \let\MFP@ifnoLaTeX\gobbleto@MFP@end
\fi
\let\@xp\expandafter
\def\@XP{\@xp\@xp\@xp}%
\MFP@ifnoLaTeX
  \def\@empty{}%
  \long\def\@gobble#1{}%
  \def\zap@space#1 #2{#1\ifx#2\@empty\else\@xp\zap@space\fi#2}%
  \long\def\@ifnextchar#1#2#3{%
    \let\reserved@d#1%
    \def\reserved@a{#2}%
    \def\reserved@b{#3}%
    \futurelet\@let@token\@ifnch}%
  \def\@ifnch{%
    \ifx\@let@token\@sptoken
      \let\reserved@c\@xifnch
    \else
      \ifx\@let@token\reserved@d
        \let\reserved@c\reserved@a
      \else
        \let\reserved@c\reserved@b
      \fi
    \fi
    \reserved@c}%
  {%
    \def\:{\global\let\@sptoken= }\: %
    \def\:{\@xifnch}\@xp\gdef\: {\futurelet\@let@token\@ifnch}%
  }%
  \def\@ifstar#1{\@ifnextchar*{\@firstoftwo{#1}}}%
  \long\def\@firstofone #1{#1}%
  \long\def\@firstoftwo #1#2{#1}%
  \long\def\@secondoftwo#1#2{#2}%
\MFP@end
\def\MFP@tttfour {10000}% ttt = Ten To The
\def\MFP@ttteight{100000000}%
\def\MFP@oneofmany#1#2\MFP@end{#1}%
\def\MFP@fifthofmany#1#2#3#4#5#6\MFP@end{#5}%
\def\MFP@ninthofmany#1#2#3#4#5#6#7#8{\MFP@oneofmany}%
\def\MFP@eightofmany#1#2#3#4#5#6#7#8#9\MFP@end{#1#2#3#4#5#6#7#8}%
\let\MFP@eos\relax
\def\MFP@EOS{\MFP@eos}%
\def\MFP@initRstack{\def\MFP@Rstack{\MFP@eos}}%
\MFP@initRstack
\countdef \MFP@tempa 0
\countdef \MFP@tempb 2
\countdef \MFP@tempc 4
\countdef \MFP@tempd 6
\countdef \MFP@tempe 8
\countdef \MFP@tempf 10
\newcount \MFP@loopctr
\def\MFP@endgroup@after#1{\edef\x{\endgroup#1}\x}%
\def\MFP@afterdef{\def\noexpand}%
\def\MFP@returned@values{%
  \MFP@afterdef\MFP@z@Val{\MFP@z@Sign\MFP@z@Int.\MFP@z@Frc}%
  \MFP@afterdef\MFP@z@Ovr{\MFP@z@Ovr}%
  \MFP@afterdef\MFP@z@Und{\MFP@z@Und}%
  \MFP@afterdef\MFPcurr@Sgn{\MFP@z@Sgn}}%
\def\MFP@subroutine#1{%
  \begingroup
    \MFP@Rzero
    \def\MFP@z@Ovr{0}%
    \def\MFP@z@Und{0}%
    #1%
  \MFP@endgroup@after\MFP@returned@values}%
\def\MFP@Rzero{%
  \def\MFP@z@Sgn{0}%
  \def\MFP@z@Int{0}%
  \def\MFP@z@Frc{00000000}}%
\def\MFP@errmsg#1#2{%
\begingroup
  \newlinechar`\^^J\let~\space
  \def\MFP@msgbreak{^^J~~~~~~~~~~~~~~}%
  \edef\reserved@a{\errhelp{#2}}\reserved@a
  \errmessage{MiniFP error: #1}%
\endgroup}%
\def\MFP@popempty@err{%
    \MFP@errmsg{cannot POP from an empty stack}%
      {There were no items on the stack for the POP operation. %
       If you continue, ^^Jthe macro will contain the %
       value \EndofStack.}}%
\def\EndofStack{0.00000000}%
\def\MFP@dividebyzero@err{%
  \MFP@errmsg{division by zero}%
    {You tried to divide by zero. What were you thinking? %
     If you continue, ^^Jthe value assigned will be either %
     \ZeroOverZeroInt.\ZeroOverZeroFrac~(numerator=0) or %
     ^^J+/-\xOverZeroInt.\xOverZeroFrac~(numerator<>0).}}%
\def\MFP@warn#1{%
\begingroup
  \newlinechar`\^^J\let~\space
  \def\MFP@msgbreak{^^J~~~~~~~~~~~~~~~~}%
  \immediate\write16{^^JMiniFP warning: #1.^^J}%
\endgroup}%
\def\MaxRealInt      {99999999}%
\def\MaxRealFrac     {99999999}%
\def\xOverZeroInt    {\MaxRealInt}%
\def\xOverZeroFrac   {\MaxRealFrac}%
\def\ZeroOverZeroInt {0}%
\def\ZeroOverZeroFrac{00000000}%
\def\MFPparse@real#1#2#3#4{%
  \MFPnospace@def\MFPtemp@Val{#4}%
  \MFPprocess@into@parts\MFPtemp@Val#1#2#3%
  \MFP@padtoeight#3}%
\def\MFPparse@x{\MFPparse@real\MFP@x@Sgn\MFP@x@Int\MFP@x@Frc}%
\def\MFPparse@y{\MFPparse@real\MFP@y@Sgn\MFP@y@Int\MFP@y@Frc}%
\def\MFPnospace@def#1#2{%
  \edef#1{#2\space}\edef#1{\@xp\zap@space#1\@empty}}%
\def\MFPprocess@into@parts#1#2#3#4{%
  \@xp\MFPsplit@dot#1..\MFP@end #3#4%
  \ifnum#31<0 \def#2{-1}%
  \else \def#2{1}%
  \fi
  \ifnum #30=0
    \def#3{0}%
    \ifnum 0#4=0 \def#2{0}\fi
  \fi
  \edef#3{\number \ifnum #2<0 -\fi#3}}%
\def\MFPsplit@dot#1.#2.#3\MFP@end#4#5{\edef#4{#1}\edef#5{#2}}%
\def\MFP@padtoeight#1{%
  \edef#1{\@xp\MFP@eightofmany#100000000\MFP@end}}%
\def\MFPgetoperand@x{\Rpop\MFP@x@Val
  \MFPprocess@into@parts\MFP@x@Val\MFP@x@Sgn\MFP@x@Int\MFP@x@Frc}%
\def\MFPgetoperand@y{\Rpop\MFP@y@Val
  \MFPprocess@into@parts\MFP@y@Val\MFP@y@Sgn\MFP@y@Int\MFP@y@Frc}%
\def\MFP@Rcat#1{\edef\MFP@Rstack{{#1}\MFP@Rstack}}%
\def\MFP@Rcattwo#1#2{\edef\MFP@Rstack{{#1}{#2}\MFP@Rstack}}%
\def\MFP@Sign#1{\ifnum#1<0 -\fi}%
\def\MFP@x@Sign{\MFP@Sign\MFP@x@Sgn}%
\def\MFP@y@Sign{\MFP@Sign\MFP@y@Sgn}%
\def\MFP@z@Sign{\MFP@Sign\MFP@z@Sgn}%
\def\copyMFP@x{\edef\MFP@z@Int{\MFP@x@Int}\edef\MFP@z@Frc{\MFP@x@Frc}}%
\def\MFPpush@result{\MFP@Rchk\MFPcurr@Sgn\MFP@Rcat\MFP@z@Val}%
\def\if@EndofStack{%
  \ifx\MFP@EOS\MFP@Rstack
    \@xp\@firstoftwo
  \else
    \@xp\@secondoftwo
  \fi}%
\def\MFP@popit{\if@EndofStack\doMFP@EOS\doMFP@popit}%
\def\doMFP@EOS#1\MFP@end#2{\MFP@popempty@err\let#2\EndofStack}%
\def\doMFP@popit#1#2\MFP@end#3{\edef\MFP@Rstack{#2}\edef#3{#1}}%
\def\MFPchk#1{%
  \MFPparse@x{#1}%
  \MFP@Rchk\MFP@x@Sgn}%
\def\MFP@Rchk#1{%
  \MFPclear@flags
  \ifnum#1>0  \MFP@postrue
  \else\ifnum#1<0  \MFP@negtrue
  \else  \MFP@zerotrue
  \fi\fi}%
\def\MFPclear@flags{\MFP@zerofalse \MFP@negfalse \MFP@posfalse}%
\def\IFzero{\ifMFP@zero\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}%
\def\IFneg {\ifMFP@neg \@xp\@firstoftwo\else\@xp\@secondoftwo\fi}%
\def\IFpos {\ifMFP@pos \@xp\@firstoftwo\else\@xp\@secondoftwo\fi}%
\newif\ifMFP@zero \newif\ifMFP@neg \newif\ifMFP@pos
\newif\ifMFPdebug
\def\MFPcmp#1#2{\MFPparse@x{#1}\MFPparse@y{#2}\MFP@Rcmp}%
\def\MFP@Rcmp{\MFPclear@flags
  \ifnum \MFP@x@Sign\MFP@x@Int>\MFP@y@Sign\MFP@y@Int\relax
    \MFP@postrue
  \else\ifnum \MFP@x@Sign\MFP@x@Int<\MFP@y@Sign\MFP@y@Int\relax
    \MFP@negtrue
  \else\ifnum \MFP@x@Sign\MFP@x@Frc>\MFP@y@Sign\MFP@y@Frc\relax
    \MFP@postrue
  \else\ifnum \MFP@x@Sign\MFP@x@Frc<\MFP@y@Sign\MFP@y@Frc\relax
    \MFP@negtrue
  \else
    \MFP@zerotrue
  \fi\fi\fi\fi}%
\let\IFeq\IFzero\let\IFlt\IFneg \let\IFgt\IFpos
\def\startMFPprogram{%
\begingroup
  \def\Rchs  {\MFP@stack@Unary\MFP@Rchs}%
  \def\Rabs  {\MFP@stack@Unary\MFP@Rabs}%
  \def\Rdbl  {\MFP@stack@Unary\MFP@Rdbl}%
  \def\Rhalve{\MFP@stack@Unary\MFP@Rhalve}%
  \def\Rsgn  {\MFP@stack@Unary\MFP@Rsgn}%
  \def\Rsq   {\MFP@stack@Unary\MFP@Rsq}%
  \def\Rinv  {\MFP@stack@Unary\MFP@Rinv}%
  \def\Rint  {\MFP@stack@Unary\MFP@Rint}%
  \def\Rfrac {\MFP@stack@Unary\MFP@Rfrac}%
  \def\Rfloor{\MFP@stack@Unary\MFP@Rfloor}%
  \def\Rceil {\MFP@stack@Unary\MFP@Rceil}%
  \def\Rincr {\MFP@stack@Unary\MFP@Rincr}%
  \def\Rdecr {\MFP@stack@Unary\MFP@Rdecr}%
  \def\Rzero {\MFP@stack@Unary\MFP@Rzero}%
  \def\Radd  {\MFP@stack@Binary\MFP@Radd}%
  \def\Rmul  {\MFP@stack@Binary\MFP@Rmul}%
  \let\Rmpy\Rmul
  \def\Rsub  {\MFP@stack@Binary\MFP@Rsub}%
  \def\Rdiv  {\MFP@stack@Binary\MFP@Rdiv}%
  \def\Rmin  {\MFP@stack@Binary\MFP@Rmin}%
  \def\Rmax  {\MFP@stack@Binary\MFP@Rmax}%
  \let\Rnoop\relax
  \def\Rcmp{%
    \MFPgetoperand@y\MFPgetoperand@x
    \MFP@Rcattwo\MFP@y@Val\MFP@x@Val
    \MFP@Rcmp}%
  \def\Rchk{%
    \MFPgetoperand@x
    \MFP@Rcat\MFP@x@Val
    \MFP@Rchk\MFP@x@Sgn}%
  \def\Rpush##1{%
    \MFPparse@x{##1}%
    \edef\MFP@z@Val{\MFP@x@Sign\MFP@x@Int.\MFP@x@Frc}%
    \edef\MFPcurr@Sgn{\MFP@x@Sgn}%
    \MFPpush@result}%
  \def\Rpop{\@xp\MFP@popit\MFP@Rstack\MFP@end}%
  \def\Rexch{%
    \Rpop\MFP@y@Val\Rpop\MFP@x@Val
    \MFP@Rcattwo\MFP@x@Val\MFP@y@Val}%
  \def\Rdup{%
    \Rpop\MFP@x@Val
    \MFP@Rcattwo\MFP@x@Val\MFP@x@Val}%
  \MFP@Rextra
  \let\Global\MFP@Global
  \let\GlobalStack\MFP@GlobalStack
  \let\Export\MFP@Export
  \let\ExportStack\MFP@ExportStack}%
\def\stopMFPprogram{\@xp\endgroup\MFPprogram@returns}%
\let\MFP@Rextra\@empty
\let\MFPprogram@returns\@empty
\def\MFPchs  {\MFP@op@Unary\MFP@Rchs}%
\def\MFPabs  {\MFP@op@Unary\MFP@Rabs}%
\def\MFPdbl  {\MFP@op@Unary\MFP@Rdbl}%
\def\MFPhalve{\MFP@op@Unary\MFP@Rhalve}%
\def\MFPsgn  {\MFP@op@Unary\MFP@Rsgn}%
\def\MFPsq   {\MFP@op@Unary\MFP@Rsq}%
\def\MFPinv  {\MFP@op@Unary\MFP@Rinv}%
\def\MFPint  {\MFP@op@Unary\MFP@Rint}%
\def\MFPfrac {\MFP@op@Unary\MFP@Rfrac}%
\def\MFPfloor{\MFP@op@Unary\MFP@Rfloor}%
\def\MFPceil {\MFP@op@Unary\MFP@Rceil}%
\def\MFPincr {\MFP@op@Unary\MFP@Rincr}%
\def\MFPdecr {\MFP@op@Unary\MFP@Rdecr}%
\def\MFPzero {\MFP@op@Unary\MFP@Rzero}%
\def\MFPstore{\MFP@op@Unary\MFP@Rstore}%
\def\MFPadd{\MFP@op@Binary\MFP@Radd}%
\def\MFPmul{\MFP@op@Binary\MFP@Rmul}%
\let\MFPmpy\MFPmul
\def\MFPsub{\MFP@op@Binary\MFP@Rsub}%
\def\MFPdiv{\MFP@op@Binary\MFP@Rdiv}%
\def\MFPmin{\MFP@op@Binary\MFP@Rmin}%
\def\MFPmax{\MFP@op@Binary\MFP@Rmax}%
\def\MFP@stack@Nullary#1{%
  \MFP@subroutine{#1}\MFPpush@result}%
\def\MFP@op@Nullary#1{%
  \MFP@subroutine{#1}\MFPstore@result}%
\def\MFP@stack@Unary#1{%
  \MFPgetoperand@x
  \MFP@subroutine{#1}\MFPpush@result}%
\def\MFP@op@Unary#1#2{%
  \MFPparse@x{#2}%
  \MFP@subroutine{#1}\MFPstore@result}%
\def\MFPstore@result#1{\MFP@Rchk\MFPcurr@Sgn\edef#1{\MFP@z@Val}}%
\def\MFP@stack@Binary#1{%
  \MFPgetoperand@y \MFPgetoperand@x
  \MFP@subroutine{#1}\MFPpush@result}%
\def\MFP@op@Binary#1#2#3{%
  \MFPparse@x{#2}\MFPparse@y{#3}%
  \MFP@subroutine{#1}\MFPstore@result}%
\let\MFPnoop\relax
\def\MFP@Rabs{%
  \copyMFP@x \edef\MFP@z@Sgn{\ifnum\MFP@x@Sgn=0 0\else1\fi}}%
\def\MFP@Rchs{\copyMFP@x \edef\MFP@z@Sgn{\number-\MFP@x@Sgn}}%
\def\MFP@Rdbl{\MFP@Rcopy xy\MFP@Radd}%
\def\MFP@Rhalve{%
  \MFP@tempa\MFP@x@Int
  \MFP@tempb\MFP@x@Frc\relax
  \ifodd\MFP@tempb
    \def\MFP@z@Und{5}%
    \advance\MFP@tempb 1
    \ifnum\MFP@ttteight=\MFP@tempb
       \MFP@tempb0 \advance\MFP@tempa1
    \fi
  \fi
  \ifodd \MFP@tempa
    \advance\MFP@tempb \MFP@ttteight\relax
  \fi
  \divide\MFP@tempa 2
  \divide\MFP@tempb 2
  \MFP@Rloadz\MFP@x@Sgn\MFP@tempa\MFP@tempb}%
\def\MFP@Rsgn{\MFP@Rloadz \MFP@x@Sgn{\ifnum\MFP@x@Sgn=0 0\else1\fi}0}%
\def\MFP@Rsq{\MFP@Rcopy xy\MFP@Rmul}%
\def\MFP@Rinv{\MFP@Rcopy xy\MFP@Rload x110\MFP@Rdiv}%
\def\MFP@Rint{%
  \MFP@Rloadz {\ifnum\MFP@x@Int=0 0\else\MFP@x@Sgn\fi}\MFP@x@Int 0}%
\def\MFP@Rfrac{%
  \MFP@Rloadz {\ifnum\MFP@x@Frc=0 0\else\MFP@x@Sgn\fi}0\MFP@x@Frc}%
\def\MFP@Rincr{%
 \ifnum\MFP@x@Sgn<0
   \ifcase\MFP@x@Int
     \MFP@tempa\MFP@ttteight
     \advance\MFP@tempa -\MFP@x@Frc\relax
     \MFP@Rloadz 10\MFP@tempa
   \or
      \MFP@Rloadz{\ifnum\MFP@x@Frc=0 0\else -1\fi}0\MFP@x@Frc
   \else
     \MFP@tempa\MFP@x@Int
     \advance\MFP@tempa -1
     \MFP@Rloadz{-1}\MFP@tempa\MFP@x@Frc
   \fi
 \else
   \MFP@tempa\MFP@x@Int
   \advance\MFP@tempa 1
   \MFP@Rloadz 1\MFP@tempa\MFP@x@Frc
 \fi}%
\def\MFP@Rdecr{%
  \edef\MFP@x@Sgn{\number -\MFP@x@Sgn}\MFP@Rincr
  \edef\MFP@z@Sgn{\number -\MFP@z@Sgn}}%
\def\MFP@Rstore{\MFP@Rcopy xz}%
\def\MFP@Rfloorceil#1{%
  \MFP@tempa\MFP@x@Int\relax
  \ifnum \MFP@x@Sgn #10
    \ifnum\MFP@x@Frc=0
    \else
      \advance\MFP@tempa1
    \fi
  \fi
  \MFP@Rloadz{\ifnum\MFP@x@Int=0 0\else\MFP@x@Sgn\fi}\MFP@tempa0}%
\def\MFP@Rfloor{\MFP@Rfloorceil<}%
\def\MFP@Rceil {\MFP@Rfloorceil>}%
\def\MFP@split#1#2#3{%
  \begingroup
    \MFP@tempa#1\relax
    \MFP@tempb\MFP@tempa
    \divide\MFP@tempb by\MFP@tttfour
    \edef#2{\number\MFP@tempb}%
    \multiply\MFP@tempb by\MFP@tttfour
    \advance\MFP@tempa-\MFP@tempb
  \MFP@endgroup@after{%
    \MFP@afterdef#2{#2}%
    \MFP@afterdef#3{\number\MFP@tempa}%
  }}%
\def\MFP@@split{%
  \MFP@split\MFP@x@Int\MFP@x@Int@ii\MFP@x@Int@i
  \MFP@split\MFP@x@Frc\MFP@x@Frc@i\MFP@x@Frc@ii
  \MFP@split\MFP@y@Int\MFP@y@Int@ii\MFP@y@Int@i
  \MFP@split\MFP@y@Frc\MFP@y@Frc@i\MFP@y@Frc@ii}%
\def\makeMFP@fourdigits#1{%
  \edef#1{\@xp\MFP@fifthofmany\number#1{}{0}{00}{000}\MFP@end\number#1}}%
\def\makeMFP@eightdigits#1{%
  \edef#1{\@xp\MFP@ninthofmany\number#1%
    {}{0}{00}{000}{0000}{00000}{000000}{0000000}\MFP@end\number#1}}%
\def\MFP@carrya{\MFP@carry\MFP@ttteight}%
\def\MFP@carrym{\MFP@carry\MFP@tttfour}%
\def\MFP@carry#1#2#3{%
  \begingroup
    \MFP@carryi{#1}#2#3%
  \MFP@endgroup@after{%
    \MFP@afterdef#3{\number\MFP@tempa}%
    \MFP@afterdef#2{\number\MFP@tempb}%
  }}%
\def\MFP@carryi#1#2#3{%
    \MFP@tempa=#3\relax
    \MFP@tempb=#2\relax
    \MFP@tempc=\MFP@tempb
    \divide  \MFP@tempc #1\relax
    \advance \MFP@tempa \MFP@tempc
    \multiply\MFP@tempc #1\relax
    \advance \MFP@tempb -\MFP@tempc}%
\def\MFP@addone#1#2#3{%
  \begingroup
    \MFP@tempa#1%
    \advance\MFP@tempa#2\relax
  \MFP@endgroup@after{%
    \MFP@afterdef#3{\number\MFP@tempa}%
  }}%
\def\MFP@multiplyone#1#2{%
  \MFP@tempa#1%
  \multiply\MFP@tempa\MFP@tempb
  \advance\MFP@tempa#2%
  \edef#2{\number\MFP@tempa}}%
\def\MFP@multiplyfour#1#2#3#4#5{%
  \MFP@tempb #1\relax
  \MFP@multiplyone\MFP@x@Int@ii #2%
  \MFP@multiplyone\MFP@x@Int@i  #3%
  \MFP@multiplyone\MFP@x@Frc@i  #4%
  \MFP@multiplyone\MFP@x@Frc@ii #5}%
\def\MFP@Rsub{\edef\MFP@y@Sgn{\number-\MFP@y@Sgn}\MFP@Radd}%
\def\MFP@Radd{%
  \MFP@tempa\MFP@x@Sgn
  \multiply\MFP@tempa\MFP@y@Sgn\relax
  \ifcase\MFP@tempa
    \ifnum \MFP@x@Sgn=0
      \MFP@Rcopy yz%
    \else
      \MFP@Rcopy xz%
    \fi
  \or
    \@xp\MFP@Radd@same
  \else
    \@xp\MFP@Radd@diff
  \fi}%
\def\MFP@Radd@same{%
  \MFP@addone\MFP@x@Frc\MFP@y@Frc\MFP@z@Frc
  \MFP@addone\MFP@x@Int\MFP@y@Int\MFP@z@Int
  \MFP@carrya\MFP@z@Frc\MFP@z@Int
  \MFP@carrya\MFP@z@Int\MFP@z@Ovr
  \makeMFP@eightdigits\MFP@z@Frc
  \edef\MFP@z@Sgn{\MFP@x@Sgn}}%
\def\MFP@Radd@diff{%
  \MFP@addone\MFP@x@Frc{-\MFP@y@Frc}\MFP@z@Frc
  \MFP@addone\MFP@x@Int{-\MFP@y@Int}\MFP@z@Int
  \MFP@tempa=\MFP@z@Int
  \MFP@tempb=\MFP@z@Frc\relax
  \ifnum\MFP@tempa=0 \else \MFP@tempa=\MFP@Sign\MFP@tempa 1 \fi
  \ifnum\MFP@tempb=0 \else \MFP@tempb=\MFP@Sign\MFP@tempb 1 \fi
  \ifnum\MFP@tempa=0 \MFP@tempa=\MFP@tempb \fi
  \edef\MFP@z@Sgn{\number\MFP@x@Sign\MFP@tempa}%
  \MFP@tempb\MFP@tempa
  \multiply\MFP@tempa \MFP@z@Int
  \multiply\MFP@tempb \MFP@z@Frc\relax
  \ifnum\MFP@tempb<0
    \advance\MFP@tempb\MFP@ttteight
    \advance\MFP@tempa-1
  \fi
  \edef\MFP@z@Int{\number\MFP@tempa}%
  \edef\MFP@z@Frc{\number\MFP@tempb}%
  \makeMFP@eightdigits\MFP@z@Frc}%
\def\MFP@Rmul{%
  \ifnum\MFP@x@Sgn=0 \MFP@Rzero
  \else\ifnum\MFP@y@Sgn=0 \MFP@Rzero
  \else \edef\MFP@z@Sgn{\number\MFP@x@Sign\MFP@y@Sgn}%
    \@XP\MFP@@Rmul
  \fi\fi}%
\def\MFP@@Rmul{%
  \def\MFP@z@Frc@iv {0}\def\MFP@z@Frc@iii{0}%
  \def\MFP@z@Frc@ii {0}\def\MFP@z@Frc@i  {0}%
  \def\MFP@z@Int@i  {0}\def\MFP@z@Int@ii {0}%
  \def\MFP@z@Int@iii{0}%
  \MFP@@split
  \MFP@multiplyfour \MFP@y@Frc@ii \MFP@z@Frc@i
    \MFP@z@Frc@ii \MFP@z@Frc@iii \MFP@z@Frc@iv
  \MFP@multiplyfour \MFP@y@Frc@i  \MFP@z@Int@i
    \MFP@z@Frc@i  \MFP@z@Frc@ii  \MFP@z@Frc@iii
  \MFP@multiplyfour \MFP@y@Int@i  \MFP@z@Int@ii
    \MFP@z@Int@i  \MFP@z@Frc@i   \MFP@z@Frc@ii
  \MFP@multiplyfour \MFP@y@Int@ii \MFP@z@Int@iii
    \MFP@z@Int@ii \MFP@z@Int@i   \MFP@z@Frc@i
  \MFP@carrym\MFP@z@Frc@iv\MFP@z@Frc@iii
  \MFP@carrym\MFP@z@Frc@iii\MFP@z@Frc@ii
  \ifnum\MFP@z@Frc@iii<5000 \else
    \MFP@tempb\MFP@z@Frc@ii
    \advance\MFP@tempb1
    \edef\MFP@z@Frc@ii{\number\MFP@tempb}%
  \fi
  \MFP@carrym\MFP@z@Frc@ii\MFP@z@Frc@i
  \MFP@carrym\MFP@z@Frc@i \MFP@z@Int@i
  \MFP@carrym\MFP@z@Int@i \MFP@z@Int@ii
  \MFP@carrym\MFP@z@Int@ii\MFP@z@Int@iii
  \makeMFP@fourdigits\MFP@z@Frc@iv
  \makeMFP@fourdigits\MFP@z@Frc@iii
  \makeMFP@fourdigits\MFP@z@Frc@ii
  \makeMFP@fourdigits\MFP@z@Frc@i
  \makeMFP@fourdigits\MFP@z@Int@i
  \edef\MFP@z@Int{\number\MFP@z@Int@ii\MFP@z@Int@i}%
  \edef\MFP@z@Frc{\MFP@z@Frc@i\MFP@z@Frc@ii}%
  \edef\MFP@z@Ovr{\number\MFP@z@Int@iii}%
  \edef\MFP@z@Und{\MFP@z@Frc@iii\MFP@z@Frc@iv}%
  \ifnum\MFP@z@Int>0
  \else\ifnum\MFP@z@Frc>0
  \else \def\MFP@z@Sgn{0}%
  \fi\fi}%
\def\MFP@Rdiv{%
  \ifnum\MFP@y@Sgn=0 \MFP@dividebyzero@err
    \ifnum\MFP@x@Sgn=0
      \edef\MFP@z@Int{\ZeroOverZeroInt}%
      \edef\MFP@z@Frc{\ZeroOverZeroFrac}%
    \else
      \edef\MFP@z@Int{\xOverZeroInt}%
      \edef\MFP@z@Frc{\xOverZeroFrac}%
    \fi
    \edef\MFP@z@Sgn{\MFP@x@Sgn}%
  \else\ifnum\MFP@x@Sgn=0 \MFP@Rzero
  \else \edef\MFP@z@Sgn{\number\MFP@x@Sign\MFP@y@Sgn}\MFP@@Rdiv
  \fi\fi}%
\def\MFP@@Rdiv{%
  \ifnum\MFP@y@Int=0
    \edef\MFP@y@Int{\number\MFP@y@Frc}%
    \def\MFP@y@Frc{00000000}%
    \MFP@tempa=8
  \else
    \MFP@tempa=0
  \fi
  \advance\MFP@tempa\MFP@numdigits@toshift\MFP@y@Int\relax
  \@XP\MFP@doshift@y\@xp\MFP@y@Int\MFP@y@Frc0000000\MFP@end
  \ifnum\MFP@x@Int=0
    \edef\MFP@x@Int{\number\MFP@x@Frc}%
    \def\MFP@x@Frc{00000000}%
    \advance\MFP@tempa -8
  \fi
  \advance\MFP@tempa-\MFP@numdigits@toshift\MFP@x@Int\relax
  \@XP\MFP@doshift@x\@xp\MFP@x@Int\MFP@x@Frc0000000\MFP@end
  \ifnum\MFP@tempa<-9
    \MFP@Rzero
  \else
    \MFP@tempf\MFP@tempa
    \advance\MFP@tempf 10
    \def\MFP@z@digits{}%
    \MFP@Rdivloop
    \MFPshiftandsplit@z@digits
    \ifnum\MFP@z@Und>4
      \MFP@addone\MFP@z@Frc1\MFP@z@Frc
      \MFP@carrya\MFP@z@Frc\MFP@z@Int
      \MFP@carrya\MFP@z@Int\MFP@z@Ovr
      \makeMFP@eightdigits\MFP@z@Frc
    \fi
  \fi}%
\def\MFP@numdigits@toshift#1{\@xp\MFP@ninthofmany#101234567\MFP@end}%
\def\MFP@doshift@x#1#2#3#4#5#6#7#8#9\MFP@end{%
  \def\MFP@x@Int{#1#2#3#4#5#6#7#8}%
  \edef\MFP@x@Frc{\MFP@eightofmany#9\MFP@end}}%
\def\MFP@doshift@y#1#2#3#4#5#6#7#8#9\MFP@end{%
  \def \MFP@y@Int{#1#2#3#4#5#6#7#8}%
  \edef\MFP@y@Frc{\MFP@eightofmany#9\MFP@end}}%
\def\MFP@Rdivloop{%
  \MFP@tempb\MFP@x@Int                    % \MFP@tempb = n_1
  \MFP@tempc\MFP@y@Int                    % \MFP@tempc = d_1
  \divide\MFP@tempb \MFP@tempc        % \MFP@tempb = n_1/d_1 = q_1
  \multiply \MFP@tempc \MFP@tempb     % \MFP@tempc = q_1 d_1
  \MFP@tempd \MFP@y@Frc                   % \MFP@tempd = d_2
  \multiply \MFP@tempd \MFP@tempb     % \MFP@tempd = q_1 d_2
  \MFP@tempe \MFP@tempc
  \advance \MFP@tempe -\MFP@x@Int\relax   % \MFP@tempe = -n_1 + q_1 d_1
  \ifnum \MFP@tempe > -9              % n_1 - q_1 d_1 < 9
    \multiply \MFP@tempe\MFP@ttteight    % -(n_1 - q_1 d_1)(10)^8
    \advance \MFP@tempe \MFP@tempd       % add q_1 d_2
    \advance \MFP@tempe -\MFP@x@Frc\relax % add -n_2
    \ifnum \MFP@tempe>0               % Crucial inequality fails
      \advance\MFP@tempb -1           % new q = q_1 - 1
      \advance\MFP@tempc -\MFP@y@Int      % q_1 d_1 - d_1 = q d_1
      \advance\MFP@tempd -\MFP@y@Frc\relax% q_1 d_2 - d_2 = q d_2
    \fi
  \fi
  \edef\MFP@z@digits{\MFP@z@digits\number\MFP@tempb}%
  \begingroup
    \MFP@carryi\MFP@ttteight\MFP@tempd\MFP@tempc
  \MFP@endgroup@after{%
    \MFP@tempc=\number\MFP@tempa
    \MFP@tempd=\number\MFP@tempb\relax
  }%
  \MFP@addone\MFP@x@Int{-\MFP@tempc}\MFP@x@Int
  \MFP@addone\MFP@x@Frc{-\MFP@tempd}\MFP@x@Frc
  \ifnum\MFP@x@Frc<0
    \MFP@addone\MFP@x@Frc\MFP@ttteight\MFP@x@Frc
    \MFP@addone\MFP@x@Int{-1}\MFP@x@Int
  \fi
  \advance\MFP@tempf -1
  \ifnum\MFP@tempf>0
    \edef\MFP@x@Int{\MFP@x@Int0}%
    \edef\MFP@x@Frc{\MFP@x@Frc0}%
    \MFP@carrya\MFP@x@Frc\MFP@x@Int
    \@xp\MFP@Rdivloop
  \fi}%
\def\MFPshiftandsplit@z@digits{%
    \advance \MFP@tempa -7
    \ifnum\MFP@tempa>0
      \def\MFP@z@Ovr{}%
      \@xp\MFPget@Ovrdigits\MFP@z@digits\MFP@end
    \else
      \ifnum\MFP@tempa<-7
        \edef\MFP@z@digits{00000000\MFP@z@digits}%
        \advance\MFP@tempa8
      \fi
      \ifnum\MFP@tempa<-3
        \edef\MFP@z@digits{0000\MFP@z@digits}%
        \advance\MFP@tempa4
      \fi
      \edef\MFP@z@digits{%
        \ifcase-\MFP@tempa\or
          0\or
          00\or
          000\or
          0000\else
          00000%
        \fi \MFP@z@digits}%
      \@xp\MFPget@Intdigits\MFP@z@digits\MFP@end
    \fi}%
\def\MFPget@Ovrdigits#1{%
  \edef\MFP@z@Ovr{\MFP@z@Ovr#1}%
  \advance\MFP@tempa -1
  \ifnum\MFP@tempa>0
    \@xp\MFPget@Ovrdigits
  \else
    \@xp\MFPget@Intdigits
  \fi}%
\def\MFPget@Intdigits#1#2#3#4#5#6#7#8{%
  \def\MFP@z@Int{\number#1#2#3#4#5#6#7#8}%
  \MFPget@Frcdigits}%
\def\MFPget@Frcdigits#1#2#3#4#5#6#7#8#9{%
  \def\MFP@z@Frc{#1#2#3#4#5#6#7#8}%
  \def\MFP@z@Und{#9}\gobbleto@MFP@end}%
\def\MFP@Rmax{%
  \MFP@Rcmp \ifMFP@neg \MFP@Rcopy yz\else\MFP@Rcopy xz\fi}%
\def\MFP@Rmin{%
  \MFP@Rcmp \ifMFP@pos \MFP@Rcopy yz\else\MFP@Rcopy xz\fi}%
\def\MFPtruncate#1#2{%
  \begingroup
    \MFP@tempa#1\relax
    \MFPparse@x{#2}%
    \ifnum\MFP@tempa<1
      \@xp\MFP@iRtrunc
    \else
      \@xp\MFP@Rtrunc
    \fi}%
\def\MFP@Rtrunc#1{%
    \edef\MFP@x@Frc{\@xp\MFP@@Rtrunc\MFP@x@Frc\MFP@end}%
    \ifnum\MFP@x@Int=0
      \ifnum\MFP@x@Frc=0
        \def\MFP@x@Sgn{0}%
      \fi
    \fi
  \MFP@endgroup@after{%
    \MFP@afterdef#1{\MFP@x@Sign\MFP@x@Int.\MFP@x@Frc}}}%
\def\MFP@@Rtrunc#1#2#3#4#5#6#7#8#9\MFP@end{%
  \ifcase\MFP@tempa\or
    #1\or
    #1#2\or
    #1#2#3\or
    #1#2#3#4\or
    #1#2#3#4#5\or
    #1#2#3#4#5#6\or
    #1#2#3#4#5#6#7\else
    #1#2#3#4#5#6#7#8\fi}%
\def\MFP@iRtrunc#1{%
  \makeMFP@eightdigits\MFP@x@Int
  \edef\MFP@x@Val{\number\MFP@x@Sign\@xp\MFP@@iRtrunc\MFP@x@Int\MFP@end}%
  \MFP@endgroup@after{\MFP@afterdef#1{\MFP@x@Val}}}%
\def\MFP@@iRtrunc#1#2#3#4#5#6#7#8#9\MFP@end{%
  \ifcase-\MFP@tempa
    #1#2#3#4#5#6#7#8\or
    #1#2#3#4#5#6#70\or
    #1#2#3#4#5#600\or
    #1#2#3#4#5000\or
    #1#2#3#40000\or
    #1#2#300000\or
    #1#2000000\or
    #10000000\else
    00000000\fi}%
\def\MFPround#1#2{%
  \begingroup
    \MFP@tempa#1\relax
    \ifnum 0>\MFP@tempa
      \edef\MFP@y@Tmp{%
        \ifcase-\MFP@tempa\or
          5\or
          50\or
          500\or
          5000\or
          50000\or
          500000\or
          5000000\else
          50000000\fi
      }%
    \else
      \edef\MFP@y@Tmp{%
        \ifcase\MFP@tempa
          .5\or
          .05\or
          .005\or
          .0005\or
          .00005\or
          .000005\or
          .0000005\or
          .00000005\else
        0\fi
      }%
    \fi
    \MFPchk{#2}\ifMFP@neg\edef\MFP@y@Tmp{-\MFP@y@Tmp}\fi
    \MFPadd{#2}\MFP@y@Tmp\MFP@z@Tmp
  \MFP@endgroup@after{\MFP@afterdef\MFP@z@Tmp{\MFP@z@Tmp}}%
  \MFPtruncate{#1}\MFP@z@Tmp}%
\def\MFPstrip{%
  \@ifstar{\MFP@strip{}}{\MFP@strip{.0}}}%
\def\MFP@strip#1#2#3{%
  \MFPparse@x{#2}%
  \ifnum \MFP@x@Frc=0
    \edef#3{\MFP@x@Sign\MFP@x@Int#1}%
  \else
    \edef#3{\MFP@x@Sign\MFP@x@Int.\@xp\MFP@@strip\MFP@x@Frc\MFP@end}%
  \fi}%
\def\MFP@@strip#1#2\MFP@end{%
  #1%
  \ifnum 0#2>0
    \@xp\MFP@@strip
  \else
    \@xp\gobbleto@MFP@end
  \fi#2\MFP@end}%
\def\MFP@Global#1{\toks@\@xp{#1}\xdef#1{\the\toks@}}%
\def\MFP@GlobalStack{\MFP@Global\MFP@Rstack}%
\def\MFP@Export#1{%
  \begingroup
    \toks@\@xp{\MFPprogram@returns}%
  \MFP@endgroup@after{%
    \MFP@afterdef\MFPprogram@returns{\the\toks@ \MFP@afterdef#1{#1}}%
  }}%
\def\MFP@ExportStack{\MFP@Export\MFP@Rstack}%
\def\MFP@Rload #1#2#3#4{%
  \@xp\edef\csname MFP@#1@Sgn\endcsname{\number#2}%
  \@xp\edef\csname MFP@#1@Int\endcsname{\number#3}%
  \@xp\edef\csname MFP@#1@Frc\endcsname{\number#4}%
  \@xp\makeMFP@eightdigits\csname MFP@#1@Frc\endcsname}%
\def\MFP@Rcopy#1#2{%
  \MFP@Rload #2{\csname MFP@#1@Sgn\endcsname}%
               {\csname MFP@#1@Int\endcsname}%
               {\csname MFP@#1@Frc\endcsname}}%
\def\MFP@Rloadz#1#2#3{%
  \edef\MFP@z@Sgn{\number#1}%
  \edef\MFP@z@Int{\number#2}%
  \edef\MFP@z@Frc{\number#3}%
  \makeMFP@eightdigits\MFP@z@Frc}%
\def\MFPpi{3.14159265}%
\def\MFPe{2.71828183}%
\def\MFPphi{1.61803399}%
\MFP@loadextra
\MFP@finish
\endinput
%%
%% End of file `minifp.sty'.
