]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fmod): Fix the final adjustment, when i2 < 0 and i1 == 0.
authorRichard M. Stallman <rms@gnu.org>
Thu, 30 Mar 1995 23:34:59 +0000 (23:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 30 Mar 1995 23:34:59 +0000 (23:34 +0000)
src/data.c

index be10e71f3b5a2896265a2a37bad8e6da46482e93..41f74cb98e1ae698148edcf786d9537390b59561 100644 (file)
@@ -1951,7 +1951,7 @@ Both X and Y must be numbers or markers.")
   i1 %= i2;
 
   /* If the "remainder" comes out with the wrong sign, fix it.  */
-  if ((i1 < 0) != (i2 < 0))
+  if (i2 < 0 ? i1 > 0 : i1 < 0)
     i1 += i2;
 
   XSETINT (val, i1);