aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 529e7b76e39..79574e0a69b 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1,5 +1,6 @@
1/* Primitive operations on floating point for GNU Emacs Lisp interpreter. 1/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
2 Copyright (C) 1988, 1993, 1994, 1999, 2003, 2005 Free Software Foundation, Inc. 2 Copyright (C) 1988, 1993, 1994, 1999, 2002, 2003, 2004,
3 2005 Free Software Foundation, Inc.
3 4
4This file is part of GNU Emacs. 5This file is part of GNU Emacs.
5 6
@@ -460,7 +461,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
460 CHECK_NUMBER_OR_FLOAT (arg1); 461 CHECK_NUMBER_OR_FLOAT (arg1);
461 CHECK_NUMBER_OR_FLOAT (arg2); 462 CHECK_NUMBER_OR_FLOAT (arg2);
462 if (INTEGERP (arg1) /* common lisp spec */ 463 if (INTEGERP (arg1) /* common lisp spec */
463 && INTEGERP (arg2)) /* don't promote, if both are ints */ 464 && INTEGERP (arg2) /* don't promote, if both are ints, and */
465 && 0 <= XINT (arg2)) /* we are sure the result is not fractional */
464 { /* this can be improved by pre-calculating */ 466 { /* this can be improved by pre-calculating */
465 EMACS_INT acc, x, y; /* some binary powers of x then accumulating */ 467 EMACS_INT acc, x, y; /* some binary powers of x then accumulating */
466 Lisp_Object val; 468 Lisp_Object val;