diff options
| author | Jim Blandy | 1992-10-31 05:19:58 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-10-31 05:19:58 +0000 |
| commit | 1cee2045653f1a3c01dfad523ea66bdca7f82a12 (patch) | |
| tree | 3e26636de87ea31115b729e9af34b23b5bdc8152 /src/floatfns.c | |
| parent | 665d3046550812b7147415bf1b1d0e3f9c103e35 (diff) | |
| download | emacs-1cee2045653f1a3c01dfad523ea66bdca7f82a12.tar.gz emacs-1cee2045653f1a3c01dfad523ea66bdca7f82a12.zip | |
* floatfns.c (Flog): Don't forget to declare the BASE argument a
Lisp_Object.
* floatfns.c (Fexpt): Don't return the value of the XSET function
call; that's not guaranteed to be the value assigned.
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index ca5b93755f8..b6bb4044750 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -292,7 +292,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 292 | for (; y > 0; y--) | 292 | for (; y > 0; y--) |
| 293 | acc *= x; | 293 | acc *= x; |
| 294 | } | 294 | } |
| 295 | return XSET (x, Lisp_Int, acc); | 295 | XFASTINT (x) = acc; |
| 296 | return x; | ||
| 296 | } | 297 | } |
| 297 | f1 = (XTYPE (num1) == Lisp_Float) ? XFLOAT (num1)->data : XINT (num1); | 298 | f1 = (XTYPE (num1) == Lisp_Float) ? XFLOAT (num1)->data : XINT (num1); |
| 298 | f2 = (XTYPE (num2) == Lisp_Float) ? XFLOAT (num2)->data : XINT (num2); | 299 | f2 = (XTYPE (num2) == Lisp_Float) ? XFLOAT (num2)->data : XINT (num2); |
| @@ -304,7 +305,7 @@ DEFUN ("log", Flog, Slog, 1, 2, 0, | |||
| 304 | "Return the natural logarithm of NUM. | 305 | "Return the natural logarithm of NUM. |
| 305 | If second optional argument BASE is given, return log NUM using that base.") | 306 | If second optional argument BASE is given, return log NUM using that base.") |
| 306 | (num, base) | 307 | (num, base) |
| 307 | register Lisp_Object num; | 308 | register Lisp_Object num, base; |
| 308 | { | 309 | { |
| 309 | double d = extract_float (num); | 310 | double d = extract_float (num); |
| 310 | 311 | ||