Message-ID: <000101c15258$c34715e0$2645ce84@ECETSP> From: "Patrick Mitran" To: References: Subject: Re: GNU Multiprecission library Date: Thu, 11 Oct 2001 08:35:03 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Reply-To: djgpp AT delorie DOT com > could you please suggest a name for a library whose code is not very long, > and that's all in C (again, not necessarily efficient!) we especially need > the division, and modulo operators... Why not just make the computer do long division (like you do it by hand) in binary? Its pretty easy since the divisor only ever fits in what you're dividing either 0 or 1 times (compared to 0 to 9 times in decimal) and the algorithm only requires right shifts and substractions. As a bonus, you get the remainder (modulus) as well at the same time. Patrick