From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Piet van Oostrum Newsgroups: gmane.emacs.devel Subject: Re: division of integers by floats Date: 08 May 2004 12:28:12 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200405062117.i46LHlKm015566@brains.moreideas.ca> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084012234 10726 80.91.224.253 (8 May 2004 10:30:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 10:30:34 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 08 12:30:23 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 1BMP67-0005eU-00 for ; Sat, 08 May 2004 12:30:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMP66-0000aJ-00 for ; Sat, 08 May 2004 12:30:23 +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 1BMP5O-0003Cq-CP for emacs-devel@quimby.gnus.org; Sat, 08 May 2004 06:29:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMP2x-0001mi-K4 for emacs-devel@gnu.org; Sat, 08 May 2004 06:27:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMP2J-0001W7-Ht for emacs-devel@gnu.org; Sat, 08 May 2004 06:26:58 -0400 Original-Received: from [213.117.16.182] (helo=ordesa.cs.uu.nl) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMP2E-0001VE-Jq for emacs-devel@gnu.org; Sat, 08 May 2004 06:26:26 -0400 Original-Received: from ordesa.cs.uu.nl (localhost [127.0.0.1]) by ordesa.cs.uu.nl (Postfix) with ESMTP id AE50A18C7B2 for ; Sat, 8 May 2004 12:28:16 +0200 (CEST) X-Mailer: emacs 21.3.50.6 (via feedmail 8 I) Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:22933 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22933 >>>>> Richard Stallman (RS) wrote: RS> Here's a patch to put the change in the DEFUN. Note that there is no RS> effective change for the two arg form, so its still efficient and there RS> wont be any "surprises" for the dominant usage. RS> Your change is ok too. RS> (Could someone install it, as a "tiny change"?) RS> --- data.c 6 May 2004 00:10:15 -0000 1.237 RS> +++ data.c 6 May 2004 20:24:25 -0000 RS> @@ -2698,7 +2698,13 @@ RS> int nargs; RS> Lisp_Object *args; RS> { RS> - return arith_driver (Adiv, nargs, args); RS> + int argnum; RS> + if (nargs == 2) RS> + return arith_driver (Adiv, nargs, args); RS> + for (argnum = 0; argnum < nargs; argnum++) RS> + if (FLOATP (args[argnum])) RS> + return float_arith_driver (0, 0, Adiv, nargs, args); RS> + return arith_driver (Adiv, nargs, args); RS> } This can even be combined as: + int argnum; + for (argnum = 2; argnum < nargs; argnum++) + if (FLOATP (args[argnum])) + return float_arith_driver (0, 0, Adiv, nargs, args); + return arith_driver (Adiv, nargs, args); -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP] Private email: P.van.Oostrum@hccnet.nl