From: Richard M. Stallman Date: Sun, 7 May 1995 09:02:39 +0000 (+0000) Subject: (Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0. X-Git-Tag: emacs-19.34~4124 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e856a264dd228101e26cd52a229248bc524a16f2;p=emacs.git (Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0. --- 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)); }