-
f3e5a7e6
by Raymond Toy at 2024-03-23T12:13:54-07:00
Fix #287: Clean up make-float-aux
We don't need to try to round small numbers to least positive float
here. When #277 was fixed, this was taken care of. Hence we can
remove all the code for that and just throw a reader-error immediately
if the result is 0 but the number is not zero.
-
9d01b5ca
by Raymond Toy at 2024-03-23T12:38:44-07:00
Oops. Need handler-case to catch errors from large numbers.
For large numbers that weren't caught the with the rough check, the
conversion of the large ratio to a float signals a `simple-type-error`
from `coerce`. We need to catch that and signal a `reader-error`.
-
01857e1c
by Raymond Toy at 2024-03-23T14:39:01-07:00
Fix #275: Signal underflow for denormals
If the floating-point underflow trap is enabled, signal an underflow
error when the number would underflow to a denormal. We still signal
a reader-error if the number would not fit in a float.
-
45532060
by Raymond Toy at 2024-03-23T14:56:58-07:00
Add tests for float underflows in the reader
-
23f449e4
by Raymond Toy at 2024-03-26T07:46:47-07:00
Merge branch 'master' into issue-275b-signal-float-underflow
-
488cbe98
by Raymond Toy at 2024-03-26T07:47:46-07:00
Add a comment about continuing with 0
-
bb8eb44c
by Raymond Toy at 2024-03-26T08:25:46-07:00
Fix bad merge
Actually need to remove `with-float-traps-masked`. Duh!
-
ba400bf5
by Raymond Toy at 2024-03-29T07:11:07-07:00
Signal reader-error on underflow instead of FP underflow.
The error message makes it clear we have a FP underflow like so:
```
* 1d-308
Reader error on #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>:
Underflow when reading "1d-308"
[Condition of type READER-ERROR]
Restarts:
0: [CONTINUE] Return 0.0d0
1: [ABORT ] Return to Top-Level.
```
-
f3d64ced
by Raymond Toy at 2024-03-29T07:16:02-07:00
Change message to mention floating point
Instead of just saying "Underflow when reading...", say "Floating
point underflow when reading..." to make it a bit clearer what
happened.
-
4ba5145d
by Raymond Toy at 2024-03-29T07:20:32-07:00
Undo some space changes and correct a comment.
Undo some tab vs space changes at the end of make-float-aux.
The comment about double-float exponent range was in the wrong place
so put it in the right place.
-
e1a35617
by Raymond Toy at 2024-03-29T07:55:55-07:00
Test FP underflow signals reader-error
We now signal a `reader-error` on a FP underflow. Thus, test that we
get a reader error. Also test that the message says we got an
underflow. This is to verify that we tell the user that it's an
underflow and not some other reader error.
-
031b5ce0
by Raymond Toy at 2024-03-29T07:58:47-07:00
Update pot file for updated message string.
-
047a0f08
by Raymond Toy at 2024-03-29T08:00:08-07:00
Add comment on where the expected string comes from.
-
ca07a140
by Raymond Toy at 2024-03-29T15:45:54-07:00
Merge branch 'master' into issue-275b-signal-float-underflow
-
2eda1257
by Raymond Toy at 2024-04-07T10:50:22-07:00
Change underflow message to be a bit clearer
Update the pot file due to the change in the message string.
-
d9a89936
by Raymond Toy at 2024-04-07T11:03:13-07:00
Merge branch 'issue-275b-signal-float-underflow' into issue-293-restart-on-reader-fp-overflow