diff options
| author | Thien-Thi Nguyen | 2005-08-06 18:27:09 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2005-08-06 18:27:09 +0000 |
| commit | cac87e302e52bae078f22a786ca3d9e2407683c4 (patch) | |
| tree | d6474ae024ee8a8e9d7a1522453e1b266b789cee /src/floatfns.c | |
| parent | 3731a85096c5e067f05d53573e559d63c8860f15 (diff) | |
| download | emacs-cac87e302e52bae078f22a786ca3d9e2407683c4.tar.gz emacs-cac87e302e52bae078f22a786ca3d9e2407683c4.zip | |
(Fexpt): Use floats for negative exponent.
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 529e7b76e39..cbcc0bfe520 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -460,7 +460,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 460 | CHECK_NUMBER_OR_FLOAT (arg1); | 460 | CHECK_NUMBER_OR_FLOAT (arg1); |
| 461 | CHECK_NUMBER_OR_FLOAT (arg2); | 461 | CHECK_NUMBER_OR_FLOAT (arg2); |
| 462 | if (INTEGERP (arg1) /* common lisp spec */ | 462 | if (INTEGERP (arg1) /* common lisp spec */ |
| 463 | && INTEGERP (arg2)) /* don't promote, if both are ints */ | 463 | && INTEGERP (arg2) /* don't promote, if both are ints, and */ |
| 464 | && 0 <= XINT (arg2)) /* we are not computing the -ARG2 root */ | ||
| 464 | { /* this can be improved by pre-calculating */ | 465 | { /* this can be improved by pre-calculating */ |
| 465 | EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ | 466 | EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ |
| 466 | Lisp_Object val; | 467 | Lisp_Object val; |