File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 5252 (match-define (endpoint cval c!) c)
5353 (match-define (endpoint dval d!) d)
5454
55- ;; Important: exp2-overflow-threshold is an exact power of 2, so we can use >=
55+ ;; Can't use >=, even though exp2-overflow-threshold is a
56+ ;; power of 2, because mpfr-exp is offset by 1 from the real
57+ ;; exponent, which matters when we add them.
5658 (define must-overflow
5759 (and (bfinfinite? hi)
5860 (= (* x-class y-class) 1 )
59- (>= (+ (mpfr-exp bval) (mpfr-exp (rnd 'zero bflog2 aval)))
60- (mpfr-exp exp2-overflow-threshold))))
61+ (> (+ (mpfr-exp bval) (mpfr-exp (rnd 'zero bflog2 aval)))
62+ (mpfr-exp exp2-overflow-threshold))))
63+
6164 (define must-underflow
6265 (and (bfzero? lo)
6366 (= (* x-class y-class) -1 )
64- (>= (+ (mpfr-exp dval) (mpfr-exp (rnd 'zero bflog2 cval)))
65- (mpfr-exp exp2-overflow-threshold))))
67+ (> (+ (mpfr-exp dval) (mpfr-exp (rnd 'zero bflog2 cval)))
68+ (mpfr-exp exp2-overflow-threshold))))
6669
6770 (define real-lo! (or lo! must-underflow (and (bfzero? lo) a! b!)))
6871 (define real-hi! (or hi! must-underflow must-overflow (and (bfinfinite? hi) c! d!)))
Original file line number Diff line number Diff line change 2121(require "main.rkt "
2222 "mpfr.rkt " )
2323(provide ival-valid?
24+ ival-refines?
2425 function-table
2526 sample-interval
2627 slow-tests
You can’t perform that action at this time.
0 commit comments