From 618290cc8302cc7c90bf5584387630fd78fb56b5 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 12 Jan 2006 23:52:09 +0000
Subject: bez123

git-svn-id: svn://tug.org/texlive/trunk@705 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/bez123/multiply.sty | 77 +++++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/bez123/multiply.sty

(limited to 'Master/texmf-dist/tex/latex/bez123/multiply.sty')

diff --git a/Master/texmf-dist/tex/latex/bez123/multiply.sty b/Master/texmf-dist/tex/latex/bez123/multiply.sty
new file mode 100644
index 00000000000..14a76bef147
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bez123/multiply.sty
@@ -0,0 +1,77 @@
+%%
+%% This is file `multiply.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bez123.dtx  (with options: `mult')
+%% 
+%% Author: Peter Wilson (CUA and NIST)
+%%         now at: peter.r.wilson@boeing.com
+%% 
+%% Copyright 1998 Peter R. Wilson
+%% 
+%%  This program is provided under the terms of the
+%%  LaTeX Project Public License distributed from CTAN
+%%  archives in directory macros/latex/base/lppl.txt.
+%% 
+\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'.
-- 
cgit v1.2.3

