Mercurial > emacs
diff src/floatfns.c @ 64752:79485c14d194
(Fexpt): Use floats for negative exponent.
| author | Thien-Thi Nguyen <ttn@gnuvola.org> |
|---|---|
| date | Sat, 06 Aug 2005 18:25:05 +0000 |
| parents | a8fa7c632ee4 |
| children | 0a5d4a20386e |
line wrap: on
line diff
--- a/src/floatfns.c Sat Aug 06 17:48:15 2005 +0000 +++ b/src/floatfns.c Sat Aug 06 18:25:05 2005 +0000 @@ -460,7 +460,8 @@ CHECK_NUMBER_OR_FLOAT (arg1); CHECK_NUMBER_OR_FLOAT (arg2); if (INTEGERP (arg1) /* common lisp spec */ - && INTEGERP (arg2)) /* don't promote, if both are ints */ + && INTEGERP (arg2) /* don't promote, if both are ints, and */ + && 0 <= XINT (arg2)) /* we are not computing the -ARG2 root */ { /* this can be improved by pre-calculating */ EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ Lisp_Object val;
