The DEFTYPE form for REAL did not use the interval arguments.

parent 19440df4
......@@ -87,7 +87,34 @@ bignums."
(deftype ext::cl-fixnum () `(SIGNED-BYTE #.CL-FIXNUM-BITS))
(deftype ext::cl-index () `(UNSIGNED-BYTE #.CL-FIXNUM-BITS))
(deftype real (&rest foo) '(OR RATIONAL FLOAT))
(deftype real (&optional (start '* start-p) (end '*))
(if start-p
(let (rat-start
real-start
rat-end
real-end)
(cond ((consp start)
(setf start (first start)
rat-start (list (rational start))
real-start (list (float start))))
((numberp start)
(setf rat-start (rational start)
real-start (float start)))
(t
(setf rat-start start
real-start start)))
(cond ((consp end)
(setf end (first end)
rat-end (list (rational end))
real-end (list (float end))))
((numberp end)
(setf rat-end (rational end)
real-end (float end)))
(t
(setf rat-end end
real-end end)))
`(OR (RATIONAL ,rat-start ,rat-end) (FLOAT ,real-start ,real-end)))
'(OR RATIONAL FLOAT)))
#-short-float
(deftype short-float (&rest args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment