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

Fix for type propagation of EXPT

parent a3726a2e
......@@ -222,13 +222,15 @@
;; (expt number-type integer) -> number-type
;; (expt number-type1 number-type2) -> (max-float number-type1 number-type2)
;;
(multiple-value-bind (simplified-exponent exponent)
(ensure-real-type exponent)
(unless (eql simplified-exponent 'integer)
(setf simplified-exponent (ensure-nonrational-type simplified-exponent)))
(multiple-value-bind (result-type base aux)
(maximum-number-type base simplified-exponent)
(values (list base exponent) result-type))))
(let ((exponent (ensure-real-type exponent)))
(values (list base exponent)
(cond ((eql exponent 'integer)
base)
((type>= '(real 0 *) base)
(let* ((exponent (ensure-nonrational-type exponent)))
(maximum-number-type exponent base)))
(t
'number)))))
(def-type-propagator abs (fname arg)
(multiple-value-bind (output arg)
......
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