Raymond Toy pushed to branch issue-459-more-accurate-dd-complex-div at cmucl / cmucl
Commits:
-
fd2e83a1
by Raymond Toy at 2025-12-12T15:38:35-08:00
-
b9494595
by Raymond Toy at 2025-12-12T15:54:05-08:00
-
e2b4641a
by Raymond Toy at 2025-12-13T14:24:22-08:00
-
16097f45
by Raymond Toy at 2025-12-13T14:24:22-08:00
-
7d9f2c5e
by Raymond Toy at 2025-12-13T14:27:29-08:00
-
9f881b52
by Raymond Toy at 2025-12-13T14:28:58-08:00
6 changed files:
- src/code/extensions.lisp
- src/code/unix.lisp
- src/compiler/float-tran-dd.lisp
- tests/float.lisp
- tests/pathname.lisp
- tests/unix.lisp
Changes:
| ... | ... | @@ -676,7 +676,7 @@ |
| 676 | 676 | subdirectories. Dirname must be a pathname to a directory. Any NAME
|
| 677 | 677 | or TYPE components in Dirname are ignored."
|
| 678 | 678 | (declare (type pathname dirname))
|
| 679 | - (when recusive
|
|
| 679 | + (when recursive
|
|
| 680 | 680 | ;; Find all the files or directories in DIRNAME.
|
| 681 | 681 | (dolist (path (directory (merge-pathnames "*.*" dirname)))
|
| 682 | 682 | ;; If the path is a directory, recursively delete the directory.
|
| ... | ... | @@ -2564,5 +2564,5 @@ |
| 2564 | 2564 | (cast result c-call:c-string)
|
| 2565 | 2565 | nil)
|
| 2566 | 2566 | status))
|
| 2567 | - (free-alien name)))))
|
|
| 2567 | + (free-alien result)))))
|
|
| 2568 | 2568 | |
| ... | ... | @@ -701,6 +701,10 @@ |
| 701 | 701 | ;; In particular iteration 1 and 3 are added. Iteration 2 and 4 were
|
| 702 | 702 | ;; not added. The test examples from iteration 2 and 4 didn't change
|
| 703 | 703 | ;; with or without changes added.
|
| 704 | +;;
|
|
| 705 | +;; This is a pretty straightforward change of
|
|
| 706 | +;; kernel::cdiv-double-float for double-double-float. The constants
|
|
| 707 | +;; may need some tweaking.
|
|
| 704 | 708 | (let* ((+dd-eps+ (scale-float 1w0 -104))
|
| 705 | 709 | (+dd-rmin+ least-positive-normalized-double-double-float)
|
| 706 | 710 | (+dd-rbig+ (/ most-positive-double-double-float 2))
|
| ... | ... | @@ -548,3 +548,10 @@ |
| 548 | 548 | (coerce y '(complex single-float)))
|
| 549 | 549 | x
|
| 550 | 550 | y)))
|
| 551 | + |
|
| 552 | + |
|
| 553 | +;; Issue #458
|
|
| 554 | +(define-test dd-mult-overflow
|
|
| 555 | + (:tag :issues)
|
|
| 556 | + (assert-equal -2w300
|
|
| 557 | + (* -2w300 1w0))) |
| ... | ... | @@ -142,3 +142,16 @@ |
| 142 | 142 | "/*.*")
|
| 143 | 143 | :truenamep nil :follow-links nil)))
|
| 144 | 144 | (assert-equal dir-tilde dir-home))))
|
| 145 | + |
|
| 146 | +(define-test delete-directory
|
|
| 147 | + (let ((dir (ensure-directories-exist "tmp/a/b/c/")))
|
|
| 148 | + ;; Verify that the directories were created.
|
|
| 149 | + (assert-equal "tmp/a/b/c/"
|
|
| 150 | + dir)
|
|
| 151 | + ;; Try to delete the directory. It should fail, which we verify
|
|
| 152 | + ;; by noting the directory listing is not empty.
|
|
| 153 | + (ext::delete-directory (pathname "tmp/"))
|
|
| 154 | + (assert-true (directory "tmp/"))
|
|
| 155 | + ;; Now recursively delete the directory.
|
|
| 156 | + (ext::delete-directory (pathname "tmp/") :recursive t)
|
|
| 157 | + (assert-false (directory "tmp/")))) |
| ... | ... | @@ -88,4 +88,7 @@ |
| 88 | 88 | (assert-false result)
|
| 89 | 89 | (assert-true (and (integerp errno) (plusp errno)))))
|
| 90 | 90 | |
| 91 | - |
|
| 91 | +(define-test unix-get-username
|
|
| 92 | + (let ((uid (unix:unix-getuid)))
|
|
| 93 | + (assert-true uid)
|
|
| 94 | + (assert-true (unix::unix-get-username uid)))) |