diff options
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index 57bece2708b..79574e0a69b 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -461,7 +461,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 461 | CHECK_NUMBER_OR_FLOAT (arg1); | 461 | CHECK_NUMBER_OR_FLOAT (arg1); |
| 462 | CHECK_NUMBER_OR_FLOAT (arg2); | 462 | CHECK_NUMBER_OR_FLOAT (arg2); |
| 463 | if (INTEGERP (arg1) /* common lisp spec */ | 463 | if (INTEGERP (arg1) /* common lisp spec */ |
| 464 | && INTEGERP (arg2)) /* don't promote, if both are ints */ | 464 | && INTEGERP (arg2) /* don't promote, if both are ints, and */ |
| 465 | && 0 <= XINT (arg2)) /* we are sure the result is not fractional */ | ||
| 465 | { /* this can be improved by pre-calculating */ | 466 | { /* this can be improved by pre-calculating */ |
| 466 | EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ | 467 | EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ |
| 467 | Lisp_Object val; | 468 | Lisp_Object val; |