changeset 11734:e6675e3ed8b3

(Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 May 1995 09:02:39 +0000
parents ae51069237f2
children f2f0f3b55a7e
files src/data.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Sun May 07 06:13:58 1995 +0000
+++ b/src/data.c	Sun May 07 09:02:39 1995 +0000
@@ -1949,7 +1949,7 @@
 
       f1 = fmod (f1, f2);
       /* If the "remainder" comes out with the wrong sign, fix it.  */
-      if ((f1 < 0) != (f2 < 0))
+      if (f2 < 0 ? f1 > 0 : f1 < 0)
 	f1 += f2;
       return (make_float (f1));
     }