File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 400400 (and b! (bfzero? b))
401401 (and b! (bfinfinite? b) (not (= a-class 0 ))))))
402402
403+ (define (ival-copy-movability i1 i2)
404+ (ival (endpoint (ival-lo-val i1) (ival-lo-fixed? i2))
405+ (endpoint (ival-hi-val i1) (ival-hi-fixed? i2))
406+ (ival-err? i1)
407+ (ival-err i1)))
408+
403409(define (ival-pow-pos x y)
404410 ;; Assumes x is positive; code copied from ival-mult
405411 (match-define (ival xlo xhi xerr? xerr) x)
410416 (define (mk-pow a b c d)
411417 (match-define (endpoint lo lo!) (rnd 'down eppow a b x-class y-class))
412418 (match-define (endpoint hi hi!) (rnd 'up eppow c d x-class y-class))
419+ (define out (ival (endpoint lo lo!) (endpoint hi hi!) (or xerr? yerr?) (or xerr yerr)))
413420 (if (or (bfzero? lo) (bfinfinite? lo) (bfzero? hi) (bfinfinite? hi))
414- ;; Leverages ival-exp's overflow logic to sometimes set extra immovability flags
415- (let ([v2 (ival-exp (ival-mult y (ival-log x)))])
416- (ival (endpoint lo (ival-lo-fixed? v2))
417- (endpoint hi (ival-hi-fixed? v2))
418- (or xerr? yerr?)
419- (or xerr yerr)))
420- (ival (endpoint lo (or lo!))
421- (endpoint hi (or hi!))
422- (or xerr? yerr?)
423- (or xerr yerr))))
421+ (ival-copy-movability out (ival-exp (ival-mult y (ival-log x))))
422+ out))
424423
425424 (match* (x-class y-class)
426425 [( 1 1 ) (mk-pow xlo ylo xhi yhi)]
You can’t perform that action at this time.
0 commit comments