mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
(Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0.
This commit is contained in:
parent
c5f48ce39e
commit
e856a264dd
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue