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: division of integers by floats Date: Wed, 05 May 2004 16:21:14 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1083790799 24918 80.91.224.253 (5 May 2004 20:59:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 May 2004 20:59:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 05 22:59:54 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 1BLTUg-0002eE-00 for ; Wed, 05 May 2004 22:59:54 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLTUf-0003zX-00 for ; Wed, 05 May 2004 22:59:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLTRb-0001B7-M7 for emacs-devel@quimby.gnus.org; Wed, 05 May 2004 16:56:43 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLT2Q-0005xY-Ob for emacs-devel@gnu.org; Wed, 05 May 2004 16:30:42 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLSyr-0004R5-LH for emacs-devel@gnu.org; Wed, 05 May 2004 16:27:33 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLStH-0002A4-CH for emacs-devel@gnu.org; Wed, 05 May 2004 16:21:15 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1BLStG-00051v-UA; Wed, 05 May 2004 16:21:14 -0400 Original-To: emacs-devel@gnu.org 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:22814 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22814 It seems like this is the best change to make. Does it give correct results? *** data.c 27 Apr 2004 04:36:00 -0400 1.235 --- data.c 05 May 2004 14:09:22 -0400 *************** *** 2520,2525 **** --- 2520,2533 ---- default: break; } + + /* For division, if any arg is a float, do the computation + in floating point. */ + if (code == Adiv) + for (argnum = 0; argnum < nargs; argnum++) + if (FLOATP (args[argnum])) + return float_arith_driver ((double) accum, 0, code, + nargs, args); for (argnum = 0; argnum < nargs; argnum++) {