Raymond Toy pushed to branch issue-275b-signal-float-underflow at cmucl / cmucl Commits: bb8eb44c by Raymond Toy at 2024-03-26T08:25:46-07:00 Fix bad merge Actually need to remove `with-float-traps-masked`. Duh! - - - - - 1 changed file: - src/code/reader.lisp Changes: ===================================== src/code/reader.lisp ===================================== @@ -1869,16 +1869,15 @@ the end of the stream." ;; Otherwise the number might fit, so we carefully compute the result. (handler-case - (with-float-traps-masked (:underflow) - (let* ((ratio (/ (* (expt 10 exponent) number) - divisor)) - (result (coerce ratio float-format))) - (when (and (zerop result) (not (zerop number))) - ;; The number we've read is so small that it gets - ;; converted to 0.0, but is not actually zero. Signal an - ;; error. See CLHS 2.3.1.1. - (error _"Underflow")) - result)) + (let* ((ratio (/ (* (expt 10 exponent) number) + divisor)) + (result (coerce ratio float-format))) + (when (and (zerop result) (not (zerop number))) + ;; The number we've read is so small that it gets + ;; converted to 0.0, but is not actually zero. Signal an + ;; error. See CLHS 2.3.1.1. + (error _"Underflow")) + result) (floating-point-underflow () ;; Resignal the underflow, but allow the user to continue with ;; 0. View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bb8eb44c424cc0ab2dba0e4e... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bb8eb44c424cc0ab2dba0e4e... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)