diff options
| author | Joakim Verona | 2013-03-26 16:14:01 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-26 16:14:01 +0100 |
| commit | 48c226c2c2592e31a47559bd1689fcc4354d9479 (patch) | |
| tree | 2f79cf5a16930fbd09d965be98b6d145c9984eb6 /src/floatfns.c | |
| parent | e11705b616777a8a72363b2037d989987630e863 (diff) | |
| parent | 9536ec028c24fbedf617b67e98a108504e5b1e73 (diff) | |
| download | emacs-48c226c2c2592e31a47559bd1689fcc4354d9479.tar.gz emacs-48c226c2c2592e31a47559bd1689fcc4354d9479.zip | |
auto upstream
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); |