diff options
| author | Richard M. Stallman | 1995-05-07 09:02:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-07 09:02:39 +0000 |
| commit | e856a264dd228101e26cd52a229248bc524a16f2 (patch) | |
| tree | 224bebde3e290469e4235387666d7e4d728f0959 /src/data.c | |
| parent | c5f48ce39ef345fc56ff48dda33ee51f13d9e1aa (diff) | |
| download | emacs-e856a264dd228101e26cd52a229248bc524a16f2.tar.gz emacs-e856a264dd228101e26cd52a229248bc524a16f2.zip | |
(Fmod): Fix the final adjustment, when f2 < 0 and f1 == 0.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
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.") | |||
| 1949 | 1949 | ||
| 1950 | f1 = fmod (f1, f2); | 1950 | f1 = fmod (f1, f2); |
| 1951 | /* If the "remainder" comes out with the wrong sign, fix it. */ | 1951 | /* If the "remainder" comes out with the wrong sign, fix it. */ |
| 1952 | if ((f1 < 0) != (f2 < 0)) | 1952 | if (f2 < 0 ? f1 > 0 : f1 < 0) |
| 1953 | f1 += f2; | 1953 | f1 += f2; |
| 1954 | return (make_float (f1)); | 1954 | return (make_float (f1)); |
| 1955 | } | 1955 | } |