Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!styx!ames!think!husc6!ut-sally!utah-cs!utah-gr!donn From: donn@utah-gr.UUCP Newsgroups: comp.unix.questions Subject: Re: mp multiple-digit arithmetic Message-ID: <1934@utah-gr.UUCP> Date: Sun, 1-Mar-87 05:39:59 EST Article-I.D.: utah-gr.1934 Posted: Sun Mar 1 05:39:59 1987 Date-Received: Mon, 2-Mar-87 06:43:07 EST References: <51@osupyr.UUCP> Distribution: na Organization: University of Utah CS Dept Lines: 35 Gerald Edgar asks: Is there (another) problem with the mp multiple-digit routines, or am I misunderstanding something? In my opinion, 2 raised to the power 3 does not have thousands of digits. I didn't realize anyone actually used this library... The manual page for mp(3X) in the Seventh Edition reports that 'rpow calculates a raised to the power b', where 'a' and 'b' are both 'mint' pointers. I have access to a copy of the Unix 32/V sources and it appears that the Seventh Edition description is incorrect -- the second argument to rpow() is an ordinary int exponent. (Also, 'mp.h' defines a type 'MINT', not 'mint'; this is one of those situations in which case distinction in C raises its ornery head.) I can't tell whether the mp library changed between the Seventh Edition and 32/V -- anyone out there know mp's pedigree? The dates on the 32/V sources are the same as the date on the Seventh Edition UPM (January 1979). When 4.3 BSD was a few months from release, some final checks were made for consistency across lint libraries, manual pages and sources. We discovered that the manual page for mp(3X) was missing -- the page doesn't appear in the copy of the 32/V release I mentioned above, so it's been missing for a long time. We managed to locate a replacement Seventh Edition page and soon discovered that it was incorrect and incomplete. The library itself contains a grand total of one (1) comment, so we had to poke around a bit to come up with the proper information... If you're doing any work with the mp library (?!), you might fare better by using the 4.3 BSD manual page than the Seventh Edition one. My one regret is failing to catch the '#ifdef lint' in 'mp.h', Donn Seeley University of Utah CS Dept donn@cs.utah.edu 40 46' 6"N 111 50' 34"W (801) 581-5668 utah-cs!donn