diff options
| author | Miles Bader | 2007-10-11 16:24:58 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-10-11 16:24:58 +0000 |
| commit | c73bd236f75b742ad4642ec94798987ae6e3e1e8 (patch) | |
| tree | ef5edc8db557fc1d25a17c379e4ae63a38b3ba5c /src/floatfns.c | |
| parent | ecb21060d5c1752d41d7a742be565c59b5fcb855 (diff) | |
| parent | 58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff) | |
| download | emacs-c73bd236f75b742ad4642ec94798987ae6e3e1e8.tar.gz emacs-c73bd236f75b742ad4642ec94798987ae6e3e1e8.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index 6ad9b95686e..a20f7981bf0 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -454,7 +454,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 454 | (arg1, arg2) | 454 | (arg1, arg2) |
| 455 | register Lisp_Object arg1, arg2; | 455 | register Lisp_Object arg1, arg2; |
| 456 | { | 456 | { |
| 457 | double f1, f2; | 457 | double f1, f2, f3; |
| 458 | 458 | ||
| 459 | CHECK_NUMBER_OR_FLOAT (arg1); | 459 | CHECK_NUMBER_OR_FLOAT (arg1); |
| 460 | CHECK_NUMBER_OR_FLOAT (arg2); | 460 | CHECK_NUMBER_OR_FLOAT (arg2); |
| @@ -500,8 +500,11 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 500 | else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor(f2))) | 500 | else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor(f2))) |
| 501 | domain_error2 ("expt", arg1, arg2); | 501 | domain_error2 ("expt", arg1, arg2); |
| 502 | #endif | 502 | #endif |
| 503 | IN_FLOAT2 (f1 = pow (f1, f2), "expt", arg1, arg2); | 503 | IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2); |
| 504 | return make_float (f1); | 504 | /* Check for overflow in the result. */ |
| 505 | if (f1 != 0.0 && f3 == 0.0) | ||
| 506 | range_error ("expt", arg1); | ||
| 507 | return make_float (f3); | ||
| 505 | } | 508 | } |
| 506 | 509 | ||
| 507 | DEFUN ("log", Flog, Slog, 1, 2, 0, | 510 | DEFUN ("log", Flog, Slog, 1, 2, 0, |