diff options
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); |