From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: Forwarded patch for modular exponentiation support (GMP powm) Date: Tue, 10 Feb 2004 09:31:06 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87oes7rft1.fsf@zip.com.au> References: <87k73cng30.fsf@raven.i.defaultvalue.org> <874qtzsv3c.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076369745 25820 80.91.224.253 (9 Feb 2004 23:35:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2004 23:35:45 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Feb 10 00:35:40 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AqKwG-0000wH-00 for ; Tue, 10 Feb 2004 00:35:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AqKuJ-00044x-1Y for guile-devel@m.gmane.org; Mon, 09 Feb 2004 18:33:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AqKsc-0003lW-8q for guile-devel@gnu.org; Mon, 09 Feb 2004 18:31:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AqKs4-0003ex-On for guile-devel@gnu.org; Mon, 09 Feb 2004 18:31:52 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AqKs3-0003eH-PK for guile-devel@gnu.org; Mon, 09 Feb 2004 18:31:20 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i19NVELE020851; Tue, 10 Feb 2004 10:31:14 +1100 Original-Received: from localhost (ppp57.dyn251.pacific.net.au [203.143.251.57]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i19NVCYb021521; Tue, 10 Feb 2004 10:31:13 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1AqKrr-0001KU-00; Tue, 10 Feb 2004 09:31:07 +1000 Original-To: Eric Hanchrow Mail-Copies-To: never In-Reply-To: <874qtzsv3c.fsf@zip.com.au> (Kevin Ryde's message of "Tue, 10 Feb 2004 09:15:35 +1000") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3354 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3354 I wrote: > > Also, if m is negative Oops, I meant the exponent k there. > The case can be detected > by mpz_invert, though it will be wasteful to do the same as what > mpz_powm is about to do. Actually, I think what you'll want is to call mpz_invert explicitly, then mpz_powm with the inverse (when it exists) and the absolute value of the exponent. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel