summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-01 03:37:28 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-01 03:37:28 +0000
commitf526b95587c92c411d42e8bc3d6881d97a341db5 (patch)
treeb5a4d8ad36d5894a2ac8c6f4a84bea37dd31a025 /src/data.c
parent348d4dd6806dcf081260ade7ad6f2131c927dc29 (diff)
downloademacs-f526b95587c92c411d42e8bc3d6881d97a341db5.tar.gz
(Frem): Fix result sign properly.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index c5564158984..bedece43285 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1762,7 +1762,8 @@ Both must be numbers or markers.")
#else
f1 = drem (f1, f2);
#endif
- if (f1 < 0)
+ /* If the "remainder" comes out with the wrong sign, fix it. */
+ if ((f1 < 0) != (f2 < 0))
f1 += f2;
return (make_float (f1));
}