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

(EXPT FIXNUM INTEGER) was inferred to be of type FIXNUM.

parent 18596a13
......@@ -219,13 +219,16 @@
(def-type-propagator expt (fname base exponent)
;; Rules:
;; (expt number-type integer) -> number-type
;; (expt fixnum integer) -> integer
;; (expt number-type integer) -> number-type
;; (expt number-type1 number-type2) -> (max-float number-type1 number-type2)
;;
(let ((exponent (ensure-real-type exponent)))
(values (list base exponent)
(cond ((eql exponent 'integer)
base)
(if (subtypep base 'fixnum)
'integer
base))
((type>= '(real 0 *) base)
(let* ((exponent (ensure-nonrational-type exponent)))
(maximum-number-type exponent base)))
......
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