From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: fix for expt bug Date: Wed, 03 Nov 2010 00:00:53 +0100 Message-ID: <87r5f3z5y2.fsf@gnu.org> References: <8762whnc4d.fsf@yeeloong.netris.org> <87r5f4l3yt.fsf@yeeloong.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1288739134 17766 80.91.229.12 (2 Nov 2010 23:05:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Nov 2010 23:05:34 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 03 00:05:27 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PDPuw-0005SF-EP for guile-devel@m.gmane.org; Wed, 03 Nov 2010 00:05:26 +0100 Original-Received: from localhost ([127.0.0.1]:42138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDPqu-00007t-Sw for guile-devel@m.gmane.org; Tue, 02 Nov 2010 19:01:16 -0400 Original-Received: from [140.186.70.92] (port=41229 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDPqn-00007n-Be for guile-devel@gnu.org; Tue, 02 Nov 2010 19:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDPqm-0008Mj-4W for guile-devel@gnu.org; Tue, 02 Nov 2010 19:01:09 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:35984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDPql-0008Ma-Pn for guile-devel@gnu.org; Tue, 02 Nov 2010 19:01:08 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PDPqk-0002zg-Uu for guile-devel@gnu.org; Wed, 03 Nov 2010 00:01:06 +0100 Original-Received: from yoda.fdn.fr ([80.67.169.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Nov 2010 00:01:06 +0100 Original-Received: from ludo by yoda.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Nov 2010 00:01:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: yoda.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Brumaire an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:v//mzOh+EcACC5Jp7XD8hZXTLhc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11102 Archived-At: Hello! Thank you Ramakrishnan for the patch, and thanks Mark for the detailed review! It looks like we’re getting close. :-) In addition to Mark’s latest comments, just a few cosmetic notes: Ramakrishnan Muthukrishnan writes: > * libguile/numbers.c: If base is negative, expt needs to find > -x^n = (-1^n) * (|x|^n). We find x^n and then if n is odd, we > also multiply the result with -1. These changes apply only for > cases where n is an integer. Please follow GNU change log conventions, i.e., describe the changes, not the rationale (info "(standards) Change Logs"). Provide appropriate explanations in ‘scm_expt’, though. > * test-suite/tests/numbers.test: Two new test cases for expt. For > cases where the base is negative and the power to be raised is > not an integer, the result should be a complex number. Ditto: list the new test case names. > + (pass-if "(eqv-loosely? -2742638075.5 (expt -2742638075.5 1))" > + (eqv-loosely? -2742638075.5 (expt -2742638075.5 1))) The first argument to ‘pass-if’ can be omitted altogether. Thanks, Ludo’.