(* . ,(lambda () interval:*))
(/ . ,(lambda () interval:/))
(QUOTIENT . ,(lambda () interval:quotient))
- (REMAINDER . ,(lambda () interval:remainder))))
+ (REMAINDER . ,(lambda () interval:remainder))
+ (MODULO . ,(lambda () interval:modulo))))
(define-integrable (->machine-pc pc)
(paranoid-quotient pc addressing-granularity))
(if (or (interval? a) (interval? b))
(error "REMAINDER doesn't do intervals:" a b))
(remainder a b))
+
+(define (interval:modulo a b)
+ (if (or (interval? a) (interval? b))
+ (error "MODULO doesn't do intervals:" a b))
+ (modulo a b))
\f
;;; A segment consists of an ending point and a coefficient.
;;; The ending point has a minimum and maximum non-negative integer value.