On 2010-01-28, at 2:42 PM, Martin Atzmueller wrote:
> there seems to be a problem in the current CVS head version (18.104.22.168)
> that is probably related to the recent optimizations in truncate/round
> (in compiler/srctran.lisp).
> ;;; Test Case
> (defun f (zone)
> (multiple-value-bind (h m) (truncate (abs zone) 1.0)
> (round (* 60.0 m))))
> The value (0.0d0) is not of type REAL.
> [Condition of type TYPE-ERROR]
> 0: (SB-KERNEL:%UNARY-ROUND (0.0d0))[:EXTERNAL]
Thanks for the report! A (hot) patch for the issue follows. The problem is simply that I forgot to handle exclusive interval bounds.
index 22186ad..72c2695 100644
@@ -1815,6 +1815,10 @@
(let* ((interval (numeric-type->interval n))
(low (interval-low interval))
(high (interval-high interval)))
+ (when (consp low)
+ (setf low (car low)))
+ (when (consp high)
+ (setf high (car high)))
`(integer ,(if low