# HG changeset patch # User Richard M. Stallman # Date 799837359 0 # Node ID e6675e3ed8b3516bfb541f313962bb3d8ca5730e # Parent ae51069237f25d37c32aa5c9f1a08daeb33989b3 (Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0. diff -r ae51069237f2 -r e6675e3ed8b3 src/data.c --- a/src/data.c Sun May 07 06:13:58 1995 +0000 +++ b/src/data.c Sun May 07 09:02:39 1995 +0000 @@ -1949,7 +1949,7 @@ 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)); }