Commit f5c03a96 authored by Juan Jose Garcia Ripoll's avatar Juan Jose Garcia Ripoll
Browse files

Fixed a couple of typos in the new type propagations for special functions

parent fb530601
......@@ -157,33 +157,33 @@
(unless (eql simplified-exponent 'integer)
(setf simplified-exponent (ensure-nonrational-type simplified-exponent)))
(multiple-value-bind (result-type base aux)
(maximum-number-type result-type base simplified-exponent)
(maximum-number-type base simplified-exponent)
(values (list base exponent) result-type))))
(def-type-propagator abs (fname arg)
(multiple-value-bind (output arg)
(ensure-number-type arg)
(values (list arg)
(or (getf '((FIXNUM (INTEGER 0 #.MOST-POSITIVE-FIXNUM))
(INTEGER (INTEGER 0 *))
(RATIONAL (RATIONAL 0 *))
(SHORT-FLOAT (SHORT-FLOAT 0 *))
(SINGLE-FLOAT (SINGLE-FLOAT 0 *))
(DOUBLE-FLOAT (DOUBLE-FLOAT 0 *))
(LONG-FLOAT (LONG-FLOAT 0 *))
(REAL (REAL 0 *))
(NUMBER (REAL 0 *)))
output)
(or (cdr (assoc output
'((FIXNUM . (INTEGER 0 #.MOST-POSITIVE-FIXNUM))
(INTEGER . (INTEGER 0 *))
(RATIONAL . (RATIONAL 0 *))
(SHORT-FLOAT . (SHORT-FLOAT 0 *))
(SINGLE-FLOAT . (SINGLE-FLOAT 0 *))
(DOUBLE-FLOAT . (DOUBLE-FLOAT 0 *))
(LONG-FLOAT . (LONG-FLOAT 0 *))
(REAL . (REAL 0 *))
(NUMBER . (REAL 0 *)))))
output))))
(def-type-propagator sqrt (fname arg)
(multiple-value-bind (output arg)
(ensure-nonrational-type arg)
(values (list arg)
(if (type<= arg '(REAL 0 *)) output 'NUMBER))))
(if (type>= '(REAL 0 *) arg) output 'NUMBER))))
(def-type-propagator isqrt (fname arg)
(if (type<= arg '#1=(integer 0 #.MOST-POSITIVE-FIXNUM))
(if (type>= '#1=(integer 0 #.MOST-POSITIVE-FIXNUM) arg)
(values '(#1#) #1#)
(values '(#2=(integer 0 *)) #2#)))
Supports Markdown
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