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: scm_product complex*big gremlin Date: Fri, 18 Jul 2003 09:30:34 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87oezs20kl.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1058484931 18133 80.91.224.249 (17 Jul 2003 23:35:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2003 23:35:31 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jul 18 01:35:28 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19dIHE-0004hU-00 for ; Fri, 18 Jul 2003 01:35:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19dIGl-0006K9-4P for guile-devel@m.gmane.org; Thu, 17 Jul 2003 19:34:39 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19dIDU-00059u-Th for guile-devel@gnu.org; Thu, 17 Jul 2003 19:31:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19dIDS-00058N-Nw for guile-devel@gnu.org; Thu, 17 Jul 2003 19:31:14 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19dIDM-00051Z-MQ for guile-devel@gnu.org; Thu, 17 Jul 2003 19:31:08 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h6HNV7ZY025834 for ; Fri, 18 Jul 2003 09:31:07 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h6HNV6Qg025954 for ; Fri, 18 Jul 2003 09:31:06 +1000 (EST) Original-Received: from localhost (ppp74.dyn228.pacific.net.au [203.143.228.74]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h6HNUlnh015524 for ; Fri, 18 Jul 2003 09:30:56 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19dICp-0003yV-00; Fri, 18 Jul 2003 09:30:35 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (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:2629 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2629 --=-=-= I applied a bit of a fix, * numbers.c (scm_product): In complex * bignum, correction to REAL/IMAG fetch, x is the complex, not y. * tests/numbers.test (*): Add complex/bignum test. The 1.6 branch looks ok, this seems to have crept in some time since then. --=-=-= Content-Disposition: attachment; filename=numbers.c.product.diff --- numbers.c.~1.193.~ 2003-07-08 10:28:38.000000000 +1000 +++ numbers.c 2003-07-17 11:07:37.000000000 +1000 @@ -3320,8 +3320,8 @@ } else if (SCM_BIGP (y)) { double z = mpz_get_d (SCM_I_BIG_MPZ (y)); scm_remember_upto_here_1 (y); - return scm_make_complex (z * SCM_COMPLEX_REAL (y), - z * SCM_COMPLEX_IMAG (y)); + return scm_make_complex (z * SCM_COMPLEX_REAL (x), + z * SCM_COMPLEX_IMAG (x)); } else if (SCM_REALP (y)) { return scm_make_complex (SCM_REAL_VALUE (y) * SCM_COMPLEX_REAL (x), SCM_REAL_VALUE (y) * SCM_COMPLEX_IMAG (x)); --=-=-= Content-Disposition: attachment; filename=numbers.test.product.diff --- numbers.test.~1.27.~ 2003-07-18 09:26:26.000000000 +1000 +++ numbers.test 2003-07-18 09:29:08.000000000 +1000 @@ -1790,6 +1790,13 @@ ;;; * ;;; +(with-test-prefix "*" + + (pass-if "complex * bignum" + (let ((big (ash 1 90))) + (= (make-rectangular big big) + (* 1+1i big))))) + ;;; ;;; / ;;; --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--