diff options
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 3 |
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)); } |