diff src/floatfns.c @ 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 6de0f61d4874
children 199bdb85a35f 2d92f5c9d6ae
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;