# HG changeset patch # User Thien-Thi Nguyen # Date 1123572972 0 # Node ID 3529fe766935dca316dda986365b9bc340bf67e0 # Parent b3d25b6347f227f0cceaefd752c063010d9e5baa (Fexpt): Use floats for negative exponent. diff -r b3d25b6347f2 -r 3529fe766935 src/floatfns.c --- 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;