Raymond Toy pushed to branch issue-474-print-parse-hex-floats at cmucl / cmucl Commits: ffe5ccd2 by Raymond Toy at 2026-02-25T07:52:09-08:00 Address review comments for inf and nan outputs Instead of printing "inf" and "nan", print "0x1.0p+inf" and "0x0.0p+nan" instead, as suggested. - - - - - 1 changed file: - src/code/ext-code.lisp Changes: ===================================== src/code/ext-code.lisp ===================================== @@ -30,9 +30,13 @@ (defun float-to-hex-string (val &optional at-p) "Prints a single or double float in bit-perfect C-style hex. If AT-P is true, prepends '+' for non-negative finite values." - (cond ((ext:float-nan-p val) "nan") + (cond ((ext:float-nan-p val) + "0x0.0p+nan") ((ext:float-infinity-p val) - (if (plusp val) (if at-p "+inf" "inf") "-inf")) + (if (plusp val) + (if at-p + "+0x1.0p+inf" "0x1.0p+inf") + "-0x1.0p+inf")) (t (multiple-value-bind (sign exp-bits mantissa bias precision suffix) (typecase val View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ffe5ccd2e2e5a36d5a97eb4c... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ffe5ccd2e2e5a36d5a97eb4c... You're receiving this email because of your account on gitlab.common-lisp.net.