Handbook
Glossary
interval-shift-safe ( i1 i2 -- i3 )
Vocabulary
math
.
intervals
Inputs
i1
an
interval
i2
an
interval
Outputs
i3
an
interval
Word description
Shifts
i1
to the left by
i2
bits. Outputs
full-interval
if the endpoints of either
i1
or
i2
are not integers, or if the endpoints of
i2
are so large that the resulting interval will consume too much memory.
Definition
USING:
accessors
kernel
math
sequences
;
IN:
math.intervals
:
interval-shift-safe
( i1 i2 -- i3 )
[
dup
to>>
first
100
>
[
2drop
[-inf,inf]
]
[
interval-shift
]
if
]
do-empty-interval
;