diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-03-12 06:23:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-03-12 06:23:11 -0700 |
commit | cbc0bbb556f281b219ddbc9a6728afc71fbeaca3 (patch) | |
tree | d52f0a3da24922590b9c0722831f71742362ebd2 /unwind.c | |
parent | d0b35b7d272eaf4fbcf7754e25801739ddb2410d (diff) | |
download | txr-cbc0bbb556f281b219ddbc9a6728afc71fbeaca3.tar.gz txr-cbc0bbb556f281b219ddbc9a6728afc71fbeaca3.tar.bz2 txr-cbc0bbb556f281b219ddbc9a6728afc71fbeaca3.zip |
float: turn out-of-range calculations into exceptions.
On platforms that have the C99 fpclassify, we can use it to
banish infinity and NaN representations. If such a thing
arises, we throw an exception rather than producing an object
that prints as #<bad-float>.
* configure: add detection for fpclassify.
* lib.c (bad_float): New inline function and macro.
(flo): If the argument is other than zero, a normal
value or a subnormal, then throw an exception. We thereby
refuse to admit such objects into our numeric object
system.
Diffstat (limited to 'unwind.c')
0 files changed, 0 insertions, 0 deletions