Mercurial > emacs
changeset 64810:3529fe766935
(Fexpt): Use floats for negative exponent.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Tue, 09 Aug 2005 07:36:12 +0000 |
parents | b3d25b6347f2 |
children | f2d8d2c65b14 |
files | src/floatfns.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/floatfns.c Tue Aug 09 02:59:34 2005 +0000 +++ b/src/floatfns.c Tue Aug 09 07:36:12 2005 +0000 @@ -461,7 +461,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 sure the result is not fractional */ { /* this can be improved by pre-calculating */ EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ Lisp_Object val;