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.
Raymond Toy pushed to branch issue-297-pprint-assemble at cmucl / cmucl
Commits:
a79e94ac by Raymond Toy at 2024-04-01T18:40:03-07:00
Add a test for the pprinter for new-assem:assemble
- - - - -
e9eed900 by Raymond Toy at 2024-04-01T18:40:20-07:00
Update release notes for issue #297
- - - - -
2 changed files:
- src/general-info/release-21f.md
- tests/pprint.lisp
Changes:
=====================================
src/general-info/release-21f.md
=====================================
@@ -65,6 +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.
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
tests/pprint.lisp
=====================================
@@ -121,3 +121,16 @@
(:no-error ()
(format nil "Nothing bad happened.")))
s))))
+
+(define-test pprint.assemble
+ (:tag :issues)
+ (assert-equal
+ "
+(NEW-ASSEM:ASSEMBLE (*CODE-SEGMENT* 'XOROSHIRO-UPDATE)
+ XOROSHIRO-UPDATE
+ (PUSH (CONS 'XOROSHIRO-UPDATE 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*))
+ s))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/cf6803a34ed3ec008fb0c7…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/cf6803a34ed3ec008fb0c7…
You're receiving this email because of your account on gitlab.common-lisp.net.