emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: division of integers by floats


From: Richard Stallman
Subject: Re: division of integers by floats
Date: Fri, 07 May 2004 21:21:16 -0400

    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,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]