diff options
| author | Paul Eggert | 2018-07-31 23:46:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-07-31 23:48:56 -0700 |
| commit | e28a37438d4ba71cd8a053e956686ab29ff97b6a (patch) | |
| tree | 77c7f4cb879dd8da7925531209222e96834dd711 /src/floatfns.c | |
| parent | 1804fece02691798394c9e9bd519cd4a53776018 (diff) | |
| download | emacs-e28a37438d4ba71cd8a053e956686ab29ff97b6a.tar.gz emacs-e28a37438d4ba71cd8a053e956686ab29ff97b6a.zip | |
Simplify by assuming C99 math.h isnan etc.
These should be portable nowadays.
* src/data.c (isnan): Remove.
* src/floatfns.c (isfinite, isnan): Remove.
* src/print.c: Include math.h, for isinf and isnan.
(float_to_string): Simplify by using them.
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index e7d404a84e0..45e786f9669 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -47,13 +47,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 47 | 47 | ||
| 48 | #include <count-leading-zeros.h> | 48 | #include <count-leading-zeros.h> |
| 49 | 49 | ||
| 50 | #ifndef isfinite | ||
| 51 | # define isfinite(x) ((x) - (x) == 0) | ||
| 52 | #endif | ||
| 53 | #ifndef isnan | ||
| 54 | # define isnan(x) ((x) != (x)) | ||
| 55 | #endif | ||
| 56 | |||
| 57 | /* Check that X is a floating point number. */ | 50 | /* Check that X is a floating point number. */ |
| 58 | 51 | ||
| 59 | static void | 52 | static void |