Raymond Toy pushed to branch issue-466-c-wrapper-specfun at cmucl / cmucl
Commits:
-
5eda6726
by Raymond Toy at 2026-01-26T17:30:13-08:00
1 changed file:
Changes:
| ... | ... | @@ -716,7 +716,6 @@ |
| 716 | 716 | |
| 717 | 717 | (dolist (stuff '((exp %exp *)
|
| 718 | 718 | (log %log float)
|
| 719 | - (sqrt %sqrt float)
|
|
| 720 | 719 | (sin %sin float)
|
| 721 | 720 | (cos %cos float)
|
| 722 | 721 | (tan %tan float)
|
| ... | ... | @@ -736,6 +735,14 @@ |
| 736 | 735 | (deftransform name ((x) '(double-float) rtype :eval-name t :when :both)
|
| 737 | 736 | `(,prim x)))))
|
| 738 | 737 | |
| 738 | +(deftransform sqrt ((x) (double-float) double-float :when :both)
|
|
| 739 | + `(%sqrt x))
|
|
| 740 | + |
|
| 741 | +;; We don't currently have sqrt specialized for single-floats, so use
|
|
| 742 | +;; the double-float version.
|
|
| 743 | +(deftransform sqrt ((x) (single-float) single-float)
|
|
| 744 | + `(coerce (%sqrt (coerce x 'double-float)) 'single-float))
|
|
| 745 | + |
|
| 739 | 746 | (defknown (%sincos)
|
| 740 | 747 | (double-float) (values double-float double-float)
|
| 741 | 748 | (movable foldable flushable))
|