%% %% This is file `multiply.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% bez123.dtx (with options: `mult') %% %% ----------------------------------------------------------------- %% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004 %% (or at: pandgwilson at earthlink dot net) %% Copyright 1998 --- 2004 Peter R. Wilson %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.3 of this license or (at your option) any %% later version. %% The latest version of the license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of %% LaTeX version 2003/06/01 or later. %% %% This work has the LPPL maintenance status "author-maintained". %% %% This work consists of the files listed in the README file. %% ----------------------------------------------------------------- %% \ProvidesPackage{multiply}[1998/10/14 v1.1 Multiplication of lengths without overflow] \newlength{\n@fl@wa} \newlength{\n@fl@wb} \newlength{\n@fl@wc} \newif\ifch@nge \newcommand{\multnooverflow}[2]{% \n@fl@wa = #1\relax% \n@fl@wb = #2\relax% \ch@ngefalse% \ifnum\n@fl@wb = \@ne% \else% \ifnum\n@fl@wb = \z@% \n@fl@wa = \z@% \else% \ifnum\n@fl@wb = \m@ne% \ch@ngetrue% \else% \ifnum\n@fl@wa = \z@% \else% \ifnum\n@fl@wa = \@ne% \n@fl@wa = \n@fl@wb% \else% \ifnum\n@fl@wa = \m@ne% \n@fl@wa = -\n@fl@wb% \else% \ifnum\n@fl@wa < \z@% \ch@ngetrue% \n@fl@wa = -\n@fl@wa% \fi% \ifnum\n@fl@wb < \z@% \n@fl@wb = -\n@fl@wb% \ifch@nge% \ch@ngefalse% \else% \ch@ngetrue% \fi% \fi% \n@fl@wc = \maxdimen% \divide\n@fl@wc by \n@fl@wb% \advance\n@fl@wc by -1sp% \m@ne \ifnum\n@fl@wa > \n@fl@wc% \n@fl@wa = \maxdimen% \PackageWarning{multiply}{Multiplication overflow}% \else% \multiply\n@fl@wa by \n@fl@wb% \fi% \fi% \fi% \fi% \fi% \fi% \fi% \ifch@nge% \n@fl@wa = -\n@fl@wa% \fi% #1 = \n@fl@wa% } \endinput %% %% End of file `multiply.sty'.