%%
%% This is file `fibnum.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fibnum.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Project: fibnum
%% Version: 2012/04/08 v1.0
%% 
%% Copyright (C) 2012 by
%%    Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% This Current Maintainer of this work is Heiko Oberdiek.
%% 
%% The Base Interpreter refers to any `TeX-Format',
%% because some files are installed in TDS:tex/generic//.
%% 
%% This work consists of the main source file fibnum.dtx
%% and the derived files
%%    fibnum.sty, fibnum.pdf, fibnum.ins, fibnum.drv, fibnum.bib,
%%    fibnum-test1.tex, fibnum-test-calc.tex.
%% 
\begingroup\catcode61\catcode48\catcode32=10\relax%
  \catcode13=5 % ^^M
  \endlinechar=13 %
  \catcode35=6 % #
  \catcode39=12 % '
  \catcode44=12 % ,
  \catcode45=12 % -
  \catcode46=12 % .
  \catcode58=12 % :
  \catcode64=11 % @
  \catcode123=1 % {
  \catcode125=2 % }
  \expandafter\let\expandafter\x\csname ver@fibnum.sty\endcsname
  \ifx\x\relax % plain-TeX, first loading
  \else
    \def\empty{}%
    \ifx\x\empty % LaTeX, first loading,
      % variable is initialized, but \ProvidesPackage not yet seen
    \else
      \expandafter\ifx\csname PackageInfo\endcsname\relax
        \def\x#1#2{%
          \immediate\write-1{Package #1 Info: #2.}%
        }%
      \else
        \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
      \fi
      \x{fibnum}{The package is already loaded}%
      \aftergroup\endinput
    \fi
  \fi
\endgroup%
\begingroup\catcode61\catcode48\catcode32=10\relax%
  \catcode13=5 % ^^M
  \endlinechar=13 %
  \catcode35=6 % #
  \catcode39=12 % '
  \catcode40=12 % (
  \catcode41=12 % )
  \catcode44=12 % ,
  \catcode45=12 % -
  \catcode46=12 % .
  \catcode47=12 % /
  \catcode58=12 % :
  \catcode64=11 % @
  \catcode91=12 % [
  \catcode93=12 % ]
  \catcode123=1 % {
  \catcode125=2 % }
  \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@fibnum.sty\endcsname
\ProvidesPackage{fibnum}%
  [2012/04/08 v1.0 Fibonacci numbers (HO)]%
\begingroup\catcode61\catcode48\catcode32=10\relax%
  \catcode13=5 % ^^M
  \endlinechar=13 %
  \catcode123=1 % {
  \catcode125=2 % }
  \catcode64=11 % @
  \def\x{\endgroup
    \expandafter\edef\csname FibNum@AtEnd\endcsname{%
      \endlinechar=\the\endlinechar\relax
      \catcode13=\the\catcode13\relax
      \catcode32=\the\catcode32\relax
      \catcode35=\the\catcode35\relax
      \catcode61=\the\catcode61\relax
      \catcode64=\the\catcode64\relax
      \catcode123=\the\catcode123\relax
      \catcode125=\the\catcode125\relax
    }%
  }%
\x\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
\catcode35=6 % #
\catcode64=11 % @
\catcode123=1 % {
\catcode125=2 % }
\def\TMP@EnsureCode#1#2{%
  \edef\FibNum@AtEnd{%
    \FibNum@AtEnd
    \catcode#1=\the\catcode#1\relax
  }%
  \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\edef\FibNum@AtEnd{\FibNum@AtEnd\noexpand\endinput}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
  \def\TMP@RequirePackage#1[#2]{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname ver@#1.sty\endcsname\relax
      \input #1.sty\relax
    \fi
  }%
  \TMP@RequirePackage{ltxcmds}[2011/04/18]%
  \TMP@RequirePackage{intcalc}[2007/09/27]%
  \TMP@RequirePackage{bigintcalc}[2007/11/11]%
\else
  \RequirePackage{ltxcmds}[2011/04/18]%
  \RequirePackage{intcalc}[2007/09/27]%
  \RequirePackage{bigintcalc}[2007/11/11]%
\fi
\def\FibNum@temp#1{%
  \expandafter\def\csname FibNum@#1\endcsname
}
\catcode46=9 % dots are ignored
\FibNum@temp{0}{0}
\FibNum@temp{1}{1}
\FibNum@temp{2}{1}
\FibNum@temp{3}{2}
\FibNum@temp{4}{3}
\FibNum@temp{5}{5}
\FibNum@temp{6}{8}
\FibNum@temp{7}{13}
\FibNum@temp{8}{21}
\FibNum@temp{9}{34}
\FibNum@temp{10}{55}
\FibNum@temp{11}{89}
\FibNum@temp{12}{144}
\FibNum@temp{13}{233}
\FibNum@temp{14}{377}
\FibNum@temp{15}{610}
\FibNum@temp{16}{987}
\FibNum@temp{17}{1.597}
\FibNum@temp{18}{2.584}
\FibNum@temp{19}{4.181}
\FibNum@temp{20}{6.765}
\FibNum@temp{21}{10.946}
\FibNum@temp{22}{17.711}
\FibNum@temp{23}{28.657}
\FibNum@temp{24}{46.368}
\FibNum@temp{25}{75.025}
\FibNum@temp{26}{121.393}
\FibNum@temp{27}{196.418}
\FibNum@temp{28}{317.811}
\FibNum@temp{29}{514.229}
\FibNum@temp{30}{832.040}
\FibNum@temp{31}{1.346.269}
\FibNum@temp{32}{2.178.309}
\FibNum@temp{33}{3.524.578}
\FibNum@temp{34}{5.702.887}
\FibNum@temp{35}{9.227.465}
\FibNum@temp{36}{14.930.352}
\FibNum@temp{37}{24.157.817}
\FibNum@temp{38}{39.088.169}
\FibNum@temp{39}{63.245.986}
\FibNum@temp{40}{102.334.155}
\FibNum@temp{41}{165.580.141}
\FibNum@temp{42}{267.914.296}
\FibNum@temp{43}{433.494.437}
\FibNum@temp{44}{701.408.733}
\FibNum@temp{45}{1.134.903.170}
\FibNum@temp{46}{1.836.311.903}
\def\FibNum@max{46}
\def\fibnumPreCalc#1{%
  \expandafter\expandafter\expandafter
  \FibNum@PreCalc\intcalcNum{#1}/%
}
\def\FibNum@PreCalc#1/{%
  \ifnum#1<\ltx@zero
    \expandafter\FibNum@PreCalc\ltx@gobble#1/%
  \else
    \ifnum#1>\FibNum@max
      \begingroup
        \ltx@LocDimenA=#1sp\relax
        \countdef\FibNum@i=255\relax
        \FibNum@i=\FibNum@max\relax
        \edef\FibNum@temp{%
          \csname FibNum@\the\FibNum@i\endcsname/%
        }%
        \advance\FibNum@i by -1\relax
        \edef\FibNum@temp{%
          \FibNum@temp
          \csname FibNum@\the\FibNum@i\endcsname
        }%
        \advance\FibNum@i\ltx@two
        \iftrue
          \expandafter\FibNum@PreCalcAux\FibNum@temp
        \fi
      \endgroup
    \fi
  \fi
}
\def\FibNum@PreCalcAux#1/#2\fi{%
  \fi
  \edef\FibNum@temp{\BigIntCalcAdd#1!#2!}%
  \global\expandafter
  \let\csname FibNum@\the\FibNum@i\endcsname\FibNum@temp
  \ifnum\FibNum@i=\ltx@LocDimenA
    \xdef\FibNum@max{\the\FibNum@i}%
  \else
    \advance\FibNum@i\ltx@one
    \expandafter\FibNum@PreCalcAux\FibNum@temp/#1%
  \fi
}
\def\fibnum#1{%
  \romannumeral
  \expandafter\expandafter\expandafter\FibNum@Do\intcalcNum{#1}/%
}
\def\FibNum@Do#1/{%
  \ifnum#1<\ltx@zero
    \FibNum@ReturnAfterElseFiFi{%
      \ifodd#1 %
        \expandafter\expandafter\expandafter\ltx@zero
      \else
        \expandafter\expandafter\expandafter\ltx@zero
        \expandafter\expandafter\expandafter-%
      \fi
      \romannumeral
      \expandafter\FibNum@Do\ltx@gobble#1/%
    }%
  \else
    \ifnum\FibNum@max<#1 %
      \ltx@ReturnAfterElseFi{%
        \expandafter
        \FibNum@ExpCalc\number\expandafter\IntCalcInc\FibNum@max!%
        \expandafter\expandafter\expandafter/%
        \csname FibNum@\FibNum@max
        \expandafter\expandafter\expandafter\endcsname
        \expandafter\expandafter\expandafter/%
        \csname FibNum@\expandafter\IntCalcDec\FibNum@max!%
        \endcsname/%
        #1%
      }%
    \else
      \expandafter\expandafter\expandafter\ltx@zero
      \csname FibNum@#1\expandafter\expandafter\expandafter\endcsname
    \fi
  \fi
}
\def\FibNum@ReturnAfterElseFiFi#1\else#2\fi\fi{\fi#1}
\def\FibNum@ExpCalc#1/#2/#3/#4\fi{%
  \fi
  \ifnum#1=#4 %
    \ltx@ReturnAfterElseFi{%
      \expandafter\expandafter\expandafter\ltx@zero
      \BigIntCalcAdd#2!#3!%
    }%
  \else
    \expandafter\FibNum@ExpCalc
    \number\IntCalcInc#1!%
    \expandafter\expandafter\expandafter/%
    \BigIntCalcAdd#2!#3!/%
    #2/#4%
  \fi
}
\FibNum@AtEnd%
\endinput
%%
%% End of file `fibnum.sty'.
