aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThien-Thi Nguyen2005-08-09 07:37:25 +0000
committerThien-Thi Nguyen2005-08-09 07:37:25 +0000
commit5a9807a8bda5980633db765300dad40ee3aed2c6 (patch)
tree39797c5260a19beb4b5f1b8389bba7047b8a263d /src
parent48b194fdd2212661a1e9879881a6accd9f4c508d (diff)
downloademacs-5a9807a8bda5980633db765300dad40ee3aed2c6.tar.gz
emacs-5a9807a8bda5980633db765300dad40ee3aed2c6.zip
(Fexpt): Use floats for negative exponent.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/floatfns.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a35daab6728..256b720eace 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12005-08-09 Thien-Thi Nguyen <ttn@gnu.org>
2
3 * floatfns.c (Fexpt): Use floats for negative exponent.
4
12005-08-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 52005-08-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 6
3 * gtkutil.c (xg_modify_menubar_widgets): Remove semicolon that 7 * gtkutil.c (xg_modify_menubar_widgets): Remove semicolon that
diff --git a/src/floatfns.c b/src/floatfns.c
index 57bece2708b..79574e0a69b 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -461,7 +461,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
461 CHECK_NUMBER_OR_FLOAT (arg1); 461 CHECK_NUMBER_OR_FLOAT (arg1);
462 CHECK_NUMBER_OR_FLOAT (arg2); 462 CHECK_NUMBER_OR_FLOAT (arg2);
463 if (INTEGERP (arg1) /* common lisp spec */ 463 if (INTEGERP (arg1) /* common lisp spec */
464 && 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 */
465 { /* this can be improved by pre-calculating */ 466 { /* this can be improved by pre-calculating */
466 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 */
467 Lisp_Object val; 468 Lisp_Object val;