changeset 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 5b1a238fcbb4
children 343b05d4869b
files src/floatfns.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;