Raymond Toy pushed to branch issue-275b-signal-float-underflow at cmucl / cmucl
Commits:
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.
- - - - -
2 changed files:
- src/code/reader.lisp
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/reader.lisp
=====================================
@@ -1883,8 +1883,8 @@ the end of the stream."
;; 0.
(let ((zero (coerce 0 float-format)))
(restart-case
- (%reader-error stream _"Floating point underflow when reading ~S"
- (read-buffer-to-string))
+ (%reader-error stream _"Floating point underflow when reading ~S: ~S"
+ float-format (read-buffer-to-string))
(continue ()
:report (lambda (stream)
(format stream "Return ~A" zero))
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -8736,7 +8736,7 @@ msgid "Underflow"
msgstr ""
#: src/code/reader.lisp
-msgid "Floating point underflow when reading ~S"
+msgid "Floating point underflow when reading ~S: ~S"
msgstr ""
#: src/code/reader.lisp
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2eda1257be4c15c51ce8bc9…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2eda1257be4c15c51ce8bc9…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-293-restart-on-reader-fp-overflow at cmucl / cmucl
Commits:
deb94045 by Raymond Toy at 2024-04-07T10:36:12-07:00
Change overflow message to be a bit clearer
Update the pot file due to the change in the message string.
- - - - -
2 changed files:
- src/code/reader.lisp
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/reader.lisp
=====================================
@@ -1857,7 +1857,7 @@ the end of the stream."
ext:most-positive-double-double-float)))))
(restart-case
- (%reader-error stream _"~S overflow reading ~S"
+ (%reader-error stream _"Floating-point overflow reading ~S: ~S"
float-format (read-buffer-to-string))
(infinity ()
:report (lambda (stream)
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -8728,7 +8728,7 @@ msgid "Internal error in floating point reader."
msgstr ""
#: src/code/reader.lisp
-msgid "~S overflow reading ~S"
+msgid "Floating-point overflow reading ~S: ~S"
msgstr ""
#: src/code/reader.lisp
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/deb940458edf3da11564476…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/deb940458edf3da11564476…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
3cdf6b8f by Raymond Toy at 2024-04-06T08:33:14-07:00
Reorder bug list to be numerically ascending.
No other changes.
- - - - -
1 changed file:
- src/general-info/release-21f.md
Changes:
=====================================
src/general-info/release-21f.md
=====================================
@@ -51,8 +51,8 @@ public domain.
* ~~#261~~ Remove `get-system-info` from "bsd-os.lisp"
* ~~#268~~ Can't clone ansi-test repo on Mac OS CI box
* ~~#265~~ CI for mac os is broken
- * ~~#269~~ Add function to get user's home directory
* ~~#266~~ Support "~user" in namestrings
+ * ~~#269~~ Add function to get user's home directory
* ~~#271~~ Update ASDF to 3.3.7
* ~~#272~~ Move scavenge code for static vectors to its own function
* ~~#274~~ 1d99999999 hangs
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/3cdf6b8fa3f23952a90f5cf…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/3cdf6b8fa3f23952a90f5cf…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-298-with-float-rounding-mode at cmucl / cmucl
Commits:
bf417b47 by Raymond Toy at 2024-04-02T08:33:30-07:00
Update cmucl.pot with new docstrings
- - - - -
e32034e0 by Raymond Toy at 2024-04-02T08:33:52-07:00
Add tests for with-float-rounding-mode
Not 100% sure the expected results are right. They seem plausible,
but I didn't actually analyze that the rounding is correct.
- - - - -
2 changed files:
- src/i18n/locale/cmucl.pot
- tests/float.lisp
Changes:
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -4868,6 +4868,25 @@ msgid ""
" their testing within, and restored on exit."
msgstr ""
+#: src/code/float-trap.lisp
+msgid ""
+"Execute BODY with the floating-point rounding mode set to\n"
+" ROUNDING-MODE. ROUNDING-MODE must a one of\n"
+"\n"
+" :NEAREST\n"
+" the default mode of round to nearest even\n"
+" :ZERO\n"
+" round numbers down towards zero. Positive numbers round down\n"
+" and negative numbers round up.\n"
+" :POSITIVE-INFINITY\n"
+" round numbers up towards positive infinity\n"
+" :NEGATIVE-INFINITY\n"
+" round numbers down towards negative infinity\n"
+"\n"
+" Only the rounding mode is restored on exit; other floating-point\n"
+" modes are not modified. "
+msgstr ""
+
#: src/code/float.lisp
msgid "Return true if the float X is denormalized."
msgstr ""
=====================================
tests/float.lisp
=====================================
@@ -212,3 +212,38 @@
;; most-positive-double-float. And a really big single-float.
(assert-error 'reader-error (read-from-string "1.8d308"))
(assert-error 'reader-error (read-from-string "1d999999999")))
+
+(defun rounding-test (x)
+ (declare (double-float x)
+ (optimize (speed 3)))
+ (* x (/ 1d0 x)))
+
+(define-test rounding-mode.nearest
+ (:tag :issues)
+ (ext:with-float-rounding-mode (:nearest)
+ (assert-equal 1d0 (rounding-test 3d0))))
+
+(define-test rounding-mode.zero.1
+ (:tag :issues)
+ (ext:with-float-rounding-mode (:zero)
+ (assert-equal 0.9999999999999999d0
+ (rounding-test 3d0))))
+
+(define-test rounding-mode.zero.2
+ (:tag :issues)
+ (ext:with-float-rounding-mode (:zero)
+ (assert-equal 0.9999999999999999d0
+ (rounding-test -3d0))))
+
+(define-test rounding-mode.positive-infinity
+ (:tag :issues)
+ (ext:with-float-rounding-mode (:positive-infinity)
+ (assert-equal 1.0000000000000002d0
+ (rounding-test 3d0))))
+
+(define-test rounding-mode.negative-infinity
+ (:tag :issues)
+ (ext:with-float-rounding-mode (:negative-infinity)
+ (assert-equal 0.9999999999999999d0
+ (rounding-test 3d0))))
+
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7543b7202a5661892dea14…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7543b7202a5661892dea14…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-297-pprint-assemble at cmucl / cmucl
Commits:
a4eb4787 by Raymond Toy at 2024-04-01T18:41:35-07:00
Clarify release notes to say new-assem:assemble
- - - - -
22f0bec1 by Raymond Toy at 2024-04-01T19:26:37-07:00
Clean up pprint new-assem:assemble test
In the source, use the VM package for the symbols instead of
defaulting to the `PPRINT-TESTS` package. This means the expected
results need to be updated too.
- - - - -
2 changed files:
- src/general-info/release-21f.md
- tests/pprint.lisp
Changes:
=====================================
src/general-info/release-21f.md
=====================================
@@ -65,7 +65,7 @@ public domain.
* ~~#288~~ Re-enable `deftransform` for random integers.
* ~~#290~~ Pprint `with-float-traps-masked` better
* ~~#291~~ Pprint `handler-case` neatly.
- * ~~#297~~ Pprint `assemble` with less indentation.
+ * ~~#297~~ Pprint `new-assem:assemble` with less indentation.
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
tests/pprint.lisp
=====================================
@@ -126,11 +126,12 @@
(:tag :issues)
(assert-equal
"
-(NEW-ASSEM:ASSEMBLE (*CODE-SEGMENT* 'XOROSHIRO-UPDATE)
- XOROSHIRO-UPDATE
- (PUSH (CONS 'XOROSHIRO-UPDATE XOROSHIRO-UPDATE) C::*ASSEMBLER-ROUTINES*))"
+(NEW-ASSEM:ASSEMBLE (C:*CODE-SEGMENT* 'X86::XOROSHIRO-UPDATE)
+ X86::XOROSHIRO-UPDATE
+ (PUSH (CONS 'X86::XOROSHIRO-UPDATE X86::XOROSHIRO-UPDATE)
+ C::*ASSEMBLER-ROUTINES*))"
(with-output-to-string (s)
- (pprint '(new-assem:assemble (*code-segment* 'xoroshiro-update)
- xoroshiro-update
- (push (cons 'xoroshiro-update xoroshiro-update) c::*assembler-routines*))
+ (pprint '(new-assem:assemble (c::*code-segment* 'vm::xoroshiro-update)
+ vm::xoroshiro-update
+ (push (cons 'vm::xoroshiro-update vm::xoroshiro-update) c::*assembler-routines*))
s))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/e9eed900d911463276db32…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/e9eed900d911463276db32…
You're receiving this email because of your account on gitlab.common-lisp.net.