math.intervals: simplify interval-bitand.

clean-macosx-x86-64
John Benediktsson 2019-10-31 10:45:36 -07:00
parent 52123559f3
commit f68df75b84
1 changed files with 7 additions and 5 deletions

View File

@ -422,11 +422,13 @@ PRIVATE>
to>> first 0 swap [a,b] to>> first 0 swap [a,b]
] ]
} }
{ [
[ 2dup [ interval-negative? ] both? ] [ min-lower-bound bit-weight neg ]
[ [ min-lower-bound bit-weight neg ] [ min-upper-bound ] 2bi [a,b] ] [
} 2dup [ interval-negative? ] both?
[ [ min-lower-bound bit-weight neg ] [ max-upper-bound ] 2bi [a,b] ] [ min-upper-bound ] [ max-upper-bound ] if
] 2bi [a,b]
]
} cond } cond
] do-empty-interval ; ] do-empty-interval ;