Commit e856a264 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0.

parent c5f48ce3
......@@ -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));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment