summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-05-07 09:02:39 +0000
committerRichard M. Stallman <rms@gnu.org>1995-05-07 09:02:39 +0000
commit6060c11b107879d2768d5a97188449e4ed3d5028 (patch)
tree20f9c6f7a1dba3b346ba3b4c7a6bb50e7140958b /src/data.c
parente87a1f7203adc6d542d7b6e9a2c753fea7c691e1 (diff)
downloademacs-6060c11b107879d2768d5a97188449e4ed3d5028.tar.gz
(Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index a6ab2ed345a..9c7b4a62efb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1949,7 +1949,7 @@ Both X and Y must be numbers or markers.")
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));
}