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: real-part frac Date: Sat, 22 Nov 2003 06:56:09 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87brr5qw46.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1069448290 32642 80.91.224.253 (21 Nov 2003 20:58:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2003 20:58:10 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 21 21:58:08 2003 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 1ANILw-0005pA-00 for ; Fri, 21 Nov 2003 21:58:08 +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 1ANJJG-00068J-TF for guile-devel@m.gmane.org; Fri, 21 Nov 2003 16:59:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ANJIS-000579-Kl for guile-devel@gnu.org; Fri, 21 Nov 2003 16:58:36 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ANJHs-0004SW-0O for guile-devel@gnu.org; Fri, 21 Nov 2003 16:58:31 -0500 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ANJHj-00045m-7r for guile-devel@gnu.org; Fri, 21 Nov 2003 16:57:51 -0500 Original-Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id hALKuMi0026452 for ; Sat, 22 Nov 2003 07:56:22 +1100 Original-Received: from localhost (ppp100.dyn228.pacific.net.au [203.143.228.100]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id hALKsbMX025946 for ; Sat, 22 Nov 2003 07:54:38 +1100 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1ANIK3-00028W-00; Sat, 22 Nov 2003 06:56:11 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) 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:3080 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3080 --=-=-= Is there a reason for real-part to return a flonum when given a fraction? Eg. (real-part 1/2) => 0.5. With exact fractions I might have expected to get back the fraction unchanged, the same way an exact integer is returned unchanged. --=-=-= Content-Disposition: attachment; filename=numbers.c.real-frac.diff --- numbers.c.~1.215.~ 1970-01-01 10:00:01.000000000 +1000 +++ numbers.c 2003-11-21 16:43:46.000000000 +1000 @@ -4972,7 +4972,7 @@ else if (SCM_COMPLEXP (z)) return scm_make_real (SCM_COMPLEX_REAL (z)); else if (SCM_FRACTIONP (z)) - return scm_make_real (scm_i_fraction2double (z)); + return z; else SCM_WTA_DISPATCH_1 (g_real_part, z, SCM_ARG1, s_real_part); } --=-=-= 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 --=-=-=--