From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ramakrishnan Muthukrishnan Newsgroups: gmane.lisp.guile.devel Subject: fix for expt bug Date: Sun, 31 Oct 2010 23:42:49 +0530 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf303b3a1be316700493eda46d X-Trace: dough.gmane.org 1288548807 26066 80.91.229.12 (31 Oct 2010 18:13:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 31 Oct 2010 18:13:27 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 31 19:13:21 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 1PCcPA-0005sL-AN for guile-devel@m.gmane.org; Sun, 31 Oct 2010 19:13:20 +0100 Original-Received: from localhost ([127.0.0.1]:46149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCcP9-0004Ix-HH for guile-devel@m.gmane.org; Sun, 31 Oct 2010 14:13:19 -0400 Original-Received: from [140.186.70.92] (port=59437 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCcP2-0004Iq-18 for guile-devel@gnu.org; Sun, 31 Oct 2010 14:13:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCcP0-0002Km-U1 for guile-devel@gnu.org; Sun, 31 Oct 2010 14:13:11 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:49141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCcP0-0002Kc-Qb for guile-devel@gnu.org; Sun, 31 Oct 2010 14:13:10 -0400 Original-Received: by vws18 with SMTP id 18so2604154vws.0 for ; Sun, 31 Oct 2010 11:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=AFWoQS/hQGlY3S46UfZC6f2RAiyuBdq33pfh4qXsX1o=; b=WECtb+OwHp2fD2C/yzLlgmUjHIsBnE7tmF2BL1d7XUHKjwYFvtW2wVmfV+LRRXfGS2 NUTYml3xSIAXJeQixntQNjdkiVEdeOw/TNiDK+6WNePfuBoK0RSdYKakYKCzFTwuol0C LrC6Ce1YZz+tg5GXT/zZphN9Myrnwl+ERkm9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=QNdAA7/Ij0gFgknqaD5zJq0J+IGSoGI8o9Z2qyBRyrh5G/1oz5M6LUe3xBJea5YtgM KD7fYk+kKA3NhY55QRYcw/1+MrJ967kg0rfhrupxNGWRg+tYpBhZcAmBSQddwyWQ/+JM vM4sd0RkhxfaKD5VWoLVkeGemorZWcfW1yCkk= Original-Received: by 10.224.180.84 with SMTP id bt20mr7308273qab.293.1288548789720; Sun, 31 Oct 2010 11:13:09 -0700 (PDT) Original-Received: by 10.229.40.147 with HTTP; Sun, 31 Oct 2010 11:12:49 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:11092 Archived-At: --20cf303b3a1be316700493eda46d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, As reported here: expt currently wrongly prints the results for any negative base numbers. The attached patch (also attached with the bug tracker) has a fix and also adds a test case. This is my first patch to guile, so please correct me if I have done something wrong. I will be happy to rework it. I am yet to recieve the assignment papers from the FSF (but they have been despatched already by the FSF), I will mail them back as soon as I get it. thanks --=20 =C2=A0 Ramakrishnan --20cf303b3a1be316700493eda46d Content-Type: text/x-patch; charset=US-ASCII; name="expt-fix.patch" Content-Disposition: attachment; filename="expt-fix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gfy8k79c0 RnJvbSBjMjM5MzlhMWMyYjdiZmUxYjNjZjIwYWJiNmE3YjQzMTY5OTI4MWExIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSYW1ha3Jpc2huYW4gTXV0aHVrcmlzaG5hbiA8dnUzcmRkQGdt YWlsLmNvbT4KRGF0ZTogU3VuLCAzMSBPY3QgMjAxMCAyMzoyMjo1MiArMDUzMApTdWJqZWN0OiBb UEFUQ0hdIEZpeCBmb3IgYnVnICMzMTQ2NC4gZXhwdCBuZWVkcyB0byB0cmVhdCBuZWdhdGl2ZSBi YXNlcyBzcGVjaWFsbHkuCiBBbHNvIGFkZGluZyB0ZXN0LXN1aXRlIGNhc2VzIGZvciBleHB0LgoK KiBsaWJndWlsZS9udW1iZXJzLmM6IGlmIGJhc2UgaXMgbmVnYXRpdmUsIGZpbmQgdGhlIGFic29s dXRlIHZhbHVlCiAgb2YgdGhlIGJhc2UsIGZpbmQgbG9nIGFuZCB0aGVuIGxhdGVyIHJlYXBwbHkg dGhlIG5lZ2F0aXZlIHNpZ24uCiAgVGhlIGJ1ZyB3YXMgY2F1c2VkIGJ5IHRoZSBmYWN0IHRoYXQg bG9nIG9mIGEgbmVnYXRpdmUgbnVtYmVyIGlzCiAgdW5kZWZpbmVkLgoKKiB0ZXN0LXN1aXRlL3Rl c3RzL251bWJlcnMudGVzdDogVHdvIG5ldyB0ZXN0IGNhc2VzIGZvciBleHB0LiBGb3IKICBjYXNl cyB3aGVyZSB0aGUgYmFzZSBpcyBuZWdhdGl2ZSBhbmQgdGhlIHBvd2VyIHRvIGJlIHJhaXNlZCBp cwogIG5vdCBhbiBpbnRlZ2VyLCB0aGUgcmVzdWx0IHNob3VsZCBiZSBhIGNvbXBsZXggbnVtYmVy LgotLS0KIGxpYmd1aWxlL251bWJlcnMuYyAgICAgICAgICAgIHwgICAxMSArKysrKysrKysrKwog dGVzdC1zdWl0ZS90ZXN0cy9udW1iZXJzLnRlc3QgfCAgICA3ICsrKysrKy0KIDIgZmlsZXMgY2hh bmdlZCwgMTcgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saWJn dWlsZS9udW1iZXJzLmMgYi9saWJndWlsZS9udW1iZXJzLmMKaW5kZXggZmJjNmNjOC4uMDdhZTk1 ZCAxMDA2NDQKLS0tIGEvbGliZ3VpbGUvbnVtYmVycy5jCisrKyBiL2xpYmd1aWxlL251bWJlcnMu YwpAQCAtNTQ1MSw2ICs1NDUxLDE3IEBAIFNDTV9ERUZJTkUgKHNjbV9leHB0LCAiZXhwdCIsIDIs IDAsIDAsCiAgICAgewogICAgICAgcmV0dXJuIHNjbV9mcm9tX2RvdWJsZSAocG93IChzY21fdG9f ZG91YmxlICh4KSwgc2NtX3RvX2RvdWJsZSAoeSkpKTsKICAgICB9CisgIGVsc2UgaWYgKHNjbV9p c19yZWFsICh4KSAmJgorICAgICAgICAgICBzY21faXNfcmVhbCAoeSkgJiYKKyAgICAgICAgICAg KHNjbV90b19kb3VibGUgKHgpIDwgMCkgJiYKKyAgICAgICAgICAgIVNDTV9GUkFDVElPTlAgKHkp KQorICAgIHsKKyAgICAgIFNDTSB4X2FiczsKKworICAgICAgeF9hYnMgPSBzY21fYWJzICh4KTsK KyAgICAgIHJldHVybiBzY21fcHJvZHVjdChzY21fZnJvbV9kb3VibGUgKC0xLjApLAorICAgICAg ICAgICAgICAgICAgICAgICAgIHNjbV9leHAgKHNjbV9wcm9kdWN0IChzY21fbG9nICh4X2Ficyks IHkpKSk7CisgICAgfQogICBlbHNlCiAgICAgcmV0dXJuIHNjbV9leHA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