diff options
| author | Tom Tromey | 2013-06-03 12:25:05 -0600 |
|---|---|---|
| committer | Tom Tromey | 2013-06-03 12:25:05 -0600 |
| commit | 68359abba96d7ec4db8aab3d3dd9cf1105c3bab5 (patch) | |
| tree | 862703e7e1a1888170136a8296a5750d6b2ae2eb /src/floatfns.c | |
| parent | cbcba8ce7f980b01c18c0fd561ef6687b1361507 (diff) | |
| parent | e2d8a6f0a229b4ebe26484b892ec4f14888f58b6 (diff) | |
| download | emacs-68359abba96d7ec4db8aab3d3dd9cf1105c3bab5.tar.gz emacs-68359abba96d7ec4db8aab3d3dd9cf1105c3bab5.zip | |
merge from trunk; clean up some issues
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index 43576a16248..6113758f964 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -193,7 +193,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 193 | CHECK_NUMBER_OR_FLOAT (arg2); | 193 | CHECK_NUMBER_OR_FLOAT (arg2); |
| 194 | if (INTEGERP (arg1) /* common lisp spec */ | 194 | if (INTEGERP (arg1) /* common lisp spec */ |
| 195 | && INTEGERP (arg2) /* don't promote, if both are ints, and */ | 195 | && INTEGERP (arg2) /* don't promote, if both are ints, and */ |
| 196 | && 0 <= XINT (arg2)) /* we are sure the result is not fractional */ | 196 | && XINT (arg2) >= 0) /* we are sure the result is not fractional */ |
| 197 | { /* this can be improved by pre-calculating */ | 197 | { /* this can be improved by pre-calculating */ |
| 198 | EMACS_INT y; /* some binary powers of x then accumulating */ | 198 | EMACS_INT y; /* some binary powers of x then accumulating */ |
| 199 | EMACS_UINT acc, x; /* Unsigned so that overflow is well defined. */ | 199 | EMACS_UINT acc, x; /* Unsigned so that overflow is well defined. */ |
| @@ -475,7 +475,7 @@ fmod_float (Lisp_Object x, Lisp_Object y) | |||
| 475 | f1 = fmod (f1, f2); | 475 | f1 = fmod (f1, f2); |
| 476 | 476 | ||
| 477 | /* If the "remainder" comes out with the wrong sign, fix it. */ | 477 | /* If the "remainder" comes out with the wrong sign, fix it. */ |
| 478 | if (f2 < 0 ? 0 < f1 : f1 < 0) | 478 | if (f2 < 0 ? f1 > 0 : f1 < 0) |
| 479 | f1 += f2; | 479 | f1 += f2; |
| 480 | 480 | ||
| 481 | return make_float (f1); | 481 | return make_float (f1); |