diff options
| author | Paul Eggert | 2012-09-10 19:28:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-10 19:28:27 -0700 |
| commit | c990426a9883c1bd1782e6b117184b654eecda67 (patch) | |
| tree | 43083f890e5286637ee754482af0f92d6d2236d0 /src/ChangeLog | |
| parent | 6fda35f2b3e3ce3c7dcc05f230f60c51c4c42e60 (diff) | |
| download | emacs-c990426a9883c1bd1782e6b117184b654eecda67.tar.gz emacs-c990426a9883c1bd1782e6b117184b654eecda67.zip | |
Simplify, document, and port floating-point.
The porting part of this patch fixes bugs on non-IEEE platforms
with frexp, ldexp, logb.
* admin/CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove.
* configure.ac (logb, cbrt): Do not check for these functions,
as they are not being used.
* doc/lispref/numbers.texi (Float Basics, Arithmetic Operations, Math Functions):
Document that / and mod (with floating point arguments), along
with asin, acos, log, log10, expt and sqrt, return special values
instead of signaling exceptions.
(Float Basics): Document that logb operates on the absolute value
of its argument.
(Math Functions): Document that (log ARG BASE) also returns NaN if
BASE is negative. Document that (expt X Y) returns NaN if X is a
finite negative number and Y a finite non-integer.
* etc/NEWS: Document NaNs versus signaling-error change.
* src/data.c, src/lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
Now static.
* src/floatfns.c: Simplify discussion of functions that Emacs doesn't
support, by removing commented-out code and briefly listing the
C89 functions excluded. The commented-out stuff was confusing
maintenance, e.g., we thought we needed cbrt but it was commented out.
(logb): Remove decl; no longer needed.
(isfinite): New macro, if not already supplied.
(isnan): Don't replace any existing macro.
(Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
are present on all C89 platforms.
(Ffrexp): Do not special-case zero, as frexp does the right thing
for that case.
(Flogb): Do not use logb, as it doesn't have the desired meaning
on hosts that use non-base-2 floating point. Instead, stick with
frexp, which is C89 anyway. Do not pass an infinity or a NaN to
frexp, to avoid getting an unspecified result.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4eda17da3a7..0e5bbfd2524 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,26 @@ | |||
| 1 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Simplify, document, and port floating-point (Bug#12381). | ||
| 4 | The porting part of this patch fixes bugs on non-IEEE platforms | ||
| 5 | with frexp, ldexp, logb. | ||
| 6 | * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error): | ||
| 7 | Now static. | ||
| 8 | * floatfns.c: Simplify discussion of functions that Emacs doesn't | ||
| 9 | support, by removing commented-out code and briefly listing the | ||
| 10 | C89 functions excluded. The commented-out stuff was confusing | ||
| 11 | maintenance, e.g., we thought we needed cbrt but it was commented out. | ||
| 12 | (logb): Remove decl; no longer needed. | ||
| 13 | (isfinite): New macro, if not already supplied. | ||
| 14 | (isnan): Don't replace any existing macro. | ||
| 15 | (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp | ||
| 16 | are present on all C89 platforms. | ||
| 17 | (Ffrexp): Do not special-case zero, as frexp does the right thing | ||
| 18 | for that case. | ||
| 19 | (Flogb): Do not use logb, as it doesn't have the desired meaning | ||
| 20 | on hosts that use non-base-2 floating point. Instead, stick with | ||
| 21 | frexp, which is C89 anyway. Do not pass an infinity or a NaN to | ||
| 22 | frexp, to avoid getting an unspecified result. | ||
| 23 | |||
| 3 | * xdisp.c (Qinhibit_debug_on_message): Now static. | 24 | * xdisp.c (Qinhibit_debug_on_message): Now static. |
| 4 | 25 | ||
| 5 | 2012-09-10 Jan Djärv <jan.h.d@swipnet.se> | 26 | 2012-09-10 Jan Djärv <jan.h.d@swipnet.se> |