| 979 | | (if (or (subtypep data-type 'float) |
| 980 | | (subtypep data-type '(complex float))) |
| 981 | | (coerce (if step-var-p 1 0) data-type) |
| 982 | | (if step-var-p 1 0)))) |
| | 979 | ;; From SBCL |
| | 980 | (let ((init (if step-var-p 1 0))) |
| | 981 | (flet ((like (&rest types) |
| | 982 | (coerce init (find-if (lambda (type) |
| | 983 | (subtypep data-type type)) |
| | 984 | types)))) |
| | 985 | (cond ((subtypep data-type 'float) |
| | 986 | (like 'single-float 'double-float |
| | 987 | 'short-float 'long-float 'float)) |
| | 988 | ((subtypep data-type '(complex float)) |
| | 989 | (like '(complex single-float) |
| | 990 | '(complex double-float) |
| | 991 | '(complex short-float) |
| | 992 | '(complex long-float) |
| | 993 | '(complex float))) |
| | 994 | (t |
| | 995 | init)))))) |