From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: division of integers by floats Date: Fri, 07 May 2004 21:21:16 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200405062117.i46LHlKm015566@brains.moreideas.ca> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1083979731 304 80.91.224.253 (8 May 2004 01:28:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 01:28:51 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 08 03:28:46 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMGdy-0001cY-00 for ; Sat, 08 May 2004 03:28:46 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMGdy-0006GU-00 for ; Sat, 08 May 2004 03:28:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMGdl-0002vN-5M for emacs-devel@quimby.gnus.org; Fri, 07 May 2004 21:28:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMGXn-0007jC-6E for emacs-devel@gnu.org; Fri, 07 May 2004 21:22:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMGX8-0006x2-Cc for emacs-devel@gnu.org; Fri, 07 May 2004 21:22:08 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMGWj-0006Hl-LH for emacs-devel@gnu.org; Fri, 07 May 2004 21:21:17 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.33) id 1BMGWi-00013n-Ll; Fri, 07 May 2004 21:21:16 -0400 Original-To: Peter Whaite In-reply-to: <200405062117.i46LHlKm015566@brains.moreideas.ca> (message from Peter Whaite on Thu, 06 May 2004 17:17:47 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22922 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22922 Here's a patch to put the change in the DEFUN. Note that there is no effective change for the two arg form, so its still efficient and there wont be any "surprises" for the dominant usage. Your change is ok too. (Could someone install it, as a "tiny change"?) --- data.c 6 May 2004 00:10:15 -0000 1.237 +++ data.c 6 May 2004 20:24:25 -0000 @@ -2698,7 +2698,13 @@ int nargs; Lisp_Object *args; { - return arith_driver (Adiv, nargs, args); + int argnum; + if (nargs == 2) + return arith_driver (Adiv, nargs, args); + for (argnum = 0; argnum < nargs; argnum++) + if (FLOATP (args[argnum])) + return float_arith_driver (0, 0, Adiv, nargs, args); + return arith_driver (Adiv, nargs, args); } DEFUN ("%", Frem, Srem, 2, 2, 0,