diff options
| author | Kenichi Handa | 2013-04-05 23:17:55 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2013-04-05 23:17:55 +0900 |
| commit | b7a6f9f7919b7fc0871ae768b58f8e746aa7dd9f (patch) | |
| tree | f32c8cce416e346d2953f063a0f22e95382cf57e /src/floatfns.c | |
| parent | 251e91474c91e16b101502c2ed7c05fc13e4ecea (diff) | |
| parent | 73931ad14ad7a51d91f10b19ae9ca8cadb256916 (diff) | |
| download | emacs-b7a6f9f7919b7fc0871ae768b58f8e746aa7dd9f.tar.gz emacs-b7a6f9f7919b7fc0871ae768b58f8e746aa7dd9f.zip | |
merge trunk
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); |