unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* division of integers by floats
@ 2004-05-05 20:21 Richard Stallman
  2004-05-06 21:17 ` Peter Whaite
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2004-05-05 20:21 UTC (permalink / 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++)
      {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-12 15:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-05 20:21 division of integers by floats Richard Stallman
2004-05-06 21:17 ` 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

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).