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

The utility functions for ENSURE-*-TYPE returned the argument type in the...

The utility functions for ENSURE-*-TYPE returned the argument type in the third and not in the second value (cmpnum.lsp)
parent f80bb43e
......@@ -90,10 +90,10 @@
(maximum-number-type general-type general-type))
(defun ensure-nonrational-type (general-type)
(maximum-number-type 'single-float general-type))
(maximum-number-type general-type 'single-float))
(defun ensure-real-type (general-type)
(maximum-number-type 'integer general-type :only-real))
(maximum-number-type general-type 'integer :only-real))
(defun arithmetic-propagator (op1-type others integer-result)
;; Propagates types for an associative operator (we do not care which one).
......@@ -179,6 +179,8 @@
(def-type-propagator sqrt (fname arg)
(multiple-value-bind (output arg)
(ensure-nonrational-type arg)
(print arg)
(print (if (type>= '(REAL 0 *) arg) output 'NUMBER))
(values (list arg)
(if (type>= '(REAL 0 *) arg) output 'NUMBER))))
......
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