* %SINGLE-FLOAT and %DOUBLE-FLOAT should not be flushable.
* BUGS entry remains: should (COERCE (EXPT 2 1024) 'SINGLE-FLOAT)
really signal a TYPE-ERROR?
3: (SB-C::BOUND-FUNC ...)
4: (SB-C::%SINGLE-FLOAT-DERIVE-TYPE-AUX ...)
+ These are now fixed, but (COERCE HUGE 'SINGLE-FLOAT) still signals a
+ type-error at runtime. The question is, should it instead signal a
+ floating-point overflow, or return an infinity?
+
408: SUBTYPEP confusion re. OR of SATISFIES of not-yet-defined predicate
As reported by Levente M\'{e}sz\'{a}ros sbcl-devel 2006-02-20,
(aver (equal (multiple-value-list
\f
;;;; coercions
-(defknown %single-float (real) single-float (movable foldable flushable))
-(defknown %double-float (real) double-float (movable foldable flushable))
+(defknown %single-float (real) single-float (movable foldable))
+(defknown %double-float (real) double-float (movable foldable))
(deftransform float ((n f) (* single-float) *)
'(%single-float n))
(specifier-type `(,',type ,(or lo '*) ,(or hi '*)))))
(defoptimizer (,fun derive-type) ((num))
- (one-arg-derive-type num #',aux-name #',fun))))))
+ (handler-case
+ (one-arg-derive-type num #',aux-name #',fun)
+ (type-error ()
+ nil)))))))
(frob %single-float single-float
most-negative-single-float most-positive-single-float)
(frob %double-float double-float
(defun new-pu-label-from-pu-labels (array)
(setf (aref (the myarraytype array) 0)
sb-ext:double-float-positive-infinity))
+
+;;; bug 407
+;;;
+;;; FIXME: it may be that TYPE-ERROR is wrong, and we should
+;;; instead signal an overflow or coerce into an infinity.
+(defun bug-407a ()
+ (loop for n from (expt 2 1024) upto (+ 10 (expt 2 1024))
+ do (handler-case
+ (coerce n 'single-float)
+ (simple-type-error ()
+ (return-from bug-407a :type-error)))))
+(assert (eq :type-error (bug-407a)))
+(defun bug-407b ()
+ (loop for n from (expt 2 1024) upto (+ 10 (expt 2 1024))
+ do (handler-case
+ (format t "~E~%" (coerce n 'single-float))
+ (simple-type-error ()
+ (return-from bug-407b :type-error)))))
+(assert (eq :type-error (bug-407b)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.14.31"
+"1.0.14.32"