[MAC_OS] (XPutPixel, XGetPixel)
[bpt/emacs.git] / src / floatfns.c
index 57bece2..d5ca50f 100644 (file)
@@ -1,6 +1,6 @@
 /* Primitive operations on floating point for GNU Emacs Lisp interpreter.
    Copyright (C) 1988, 1993, 1994, 1999, 2002, 2003, 2004,
-                 2005 Free Software Foundation, Inc.
+                 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -461,7 +461,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
   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;
@@ -507,7 +508,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
 
 DEFUN ("log", Flog, Slog, 1, 2, 0,
        doc: /* Return the natural logarithm of ARG.
-If second optional argument BASE is given, return log ARG using that base.  */)
+If the optional argument BASE is given, return log ARG using that base.  */)
      (arg, base)
      register Lisp_Object arg, base;
 {