Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!rosevax!umnd-cs!max From: max@umnd-cs.UUCP (Max Benson) Newsgroups: comp.lang.c,comp.unix.questions,sci.math Subject: Re: Wanted: arbitrary precision integer arithmetic Message-ID: <266@umnd-cs.UUCP> Date: Thu, 4-Dec-86 12:25:47 EST Article-I.D.: umnd-cs.266 Posted: Thu Dec 4 12:25:47 1986 Date-Received: Fri, 5-Dec-86 05:15:24 EST References: <4056@jhunix.UUCP> <556@maynard.UUCP> Distribution: na Organization: University of Minnesota at Duluth, Computer Science Lines: 20 Keywords: arbitrary precision integer arithmetic Summary: Bugs in UNIX mp library, have alternative Xref: mnetor comp.lang.c:243 comp.unix.questions:249 sci.math:277 Last time I checked there remain serious bugs in the UNIX mp library that remain from the PDP-11 days. One was in the divide routine that made it divide by zero for only certain large numbers. This was because the exact integer representation wasn't normalized at some point. Another problem was that the in the add/subtract routine it gets signs mixed up in one case. I guess that the UNIX programs that use mp don't ever find the add/subtract bug because they remove the signs before getting to mp, but I imagine that the divide bug is out there waiting for you in dc. I found and tracked down these bugs for my own purposes, but now I have written a new library (in C, hopefully vanilla, currently runs on SUN, UMAX4.2) of arbitrary precision integer arithmetic that is somewhat faster and better yet public domain! I can share this with those interested. It is part of a larger library of routines for symbolic mathematics which will be eventually freely available once it is documented. Max Benson: University of Minnesota-Duluth max@umn-duluth.csnet ...!ihnp4!umn-cs!umd-cs!max