unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: division of integers by floats
Date: Wed, 05 May 2004 16:21:14 -0400	[thread overview]
Message-ID: <E1BLStG-00051v-UA@fencepost.gnu.org> (raw)

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++)
      {

             reply	other threads:[~2004-05-05 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-05 20:21 Richard Stallman [this message]
2004-05-06 21:17 ` division of integers by floats Peter Whaite
2004-05-08  1:21   ` Richard Stallman
2004-05-08 10:28     ` Piet van Oostrum
2004-05-09  0:49       ` Juanma Barranquero
2004-05-12 15:00       ` Peter Whaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1BLStG-00051v-UA@fencepost.gnu.org \
    --to=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).