(defun interval-bounded-p (x how)
(declare (type interval x))
(ecase how
- ('above
+ (above
(interval-high x))
- ('below
+ (below
(interval-low x))
- ('both
+ (both
(and (interval-low x) (interval-high x)))))
;;; signed zero comparison functions. Use these functions if we need
:low (bound-mul (interval-low x) (interval-low y))
:high (bound-mul (interval-high x) (interval-high y))))
(t
- (error "internal error in INTERVAL-MUL"))))))
+ (bug "excluded case in INTERVAL-MUL"))))))
;;; Divide two intervals.
(defun interval-div (top bot)
:low (bound-div (interval-low top) (interval-high bot) t)
:high (bound-div (interval-high top) (interval-low bot) nil)))
(t
- (error "internal error in INTERVAL-DIV"))))))
+ (bug "excluded case in INTERVAL-DIV"))))))
;;; Apply the function F to the interval X. If X = [a, b], then the
;;; result is [f(a), f(b)]. It is up to the user to make sure the
(defun interval-abs (x)
(declare (type interval x))
(case (interval-range-info x)
- ('+
+ (+
(copy-interval x))
- ('-
+ (-
(interval-neg x))
(t
(destructuring-bind (x- x+) (interval-split 0 x t t)
(flet ((ash-outer (n s)
(when (and (fixnump s)
(<= s 64)
- (> s sb!vm:*target-most-negative-fixnum*))
+ (> s sb!xc:most-negative-fixnum))
(ash n s)))
;; KLUDGE: The bare 64's here should be related to
;; symbolic machine word size values somehow.
(ash-inner (n s)
(if (and (fixnump s)
- (> s sb!vm:*target-most-negative-fixnum*))
+ (> s sb!xc:most-negative-fixnum))
(ash n (min s 64))
(if (minusp n) -1 0))))
(or (and (csubtypep n-type (specifier-type 'integer))
(multi-compare 'char-lessp args t))
;;; This function does source transformation of N-arg inequality
-;;; functions such as /=. This is similar to Multi-Compare in the <3
+;;; functions such as /=. This is similar to MULTI-COMPARE in the <3
;;; arg cases. If there are more than two args, then we expand into
;;; the appropriate n^2 comparisons only when speed is important.
(declaim (ftype (function (symbol list) *) multi-not-equal))