]> git.eshelyaron.com Git - emacs.git/commit
Port NaN, infinity handling better to VAX
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Jul 2023 21:26:29 +0000 (14:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Jul 2023 21:43:03 +0000 (14:43 -0700)
commit0cd519971d199836ba0a6e9f0e36af9b9accaf0d
treeadf49dde9f863b4e1ce00a9c37dfd1a761a98a7a
parentb94e7e6334718061879c32025941f00913078230
Port NaN, infinity handling better to VAX

Nowadays .elc files routinely contain tokens like 1.0e+INF and
0.0e+NaN that do not work on antiques like the VAX that lack IEEE fp.
Port Emacs to these platforms, by treating infinities as extreme
values and NaNs as strings that trap if used numerically.
* src/lread.c (INFINITY): Default to HUGE_VAL if non-IEEE.
(not_a_number) [!IEEE_FLOATING_POINT]: New static array.
(syms_of_lread) [!IEEE_FLOATING_POINT]: Initialize it.
(read0): Report invalid syntax for +0.0e+NaN on platforms
that lack NaNs.
(string_to_number): On non-IEEE platforms, return HUGE_VAL
for infinity and a string for NaN.  All callers changed.
doc/lispref/numbers.texi
etc/NEWS
src/data.c
src/lread.c
src/process.c