That is, write a function f which does not use ∊, so that:
x ← ¯100 + ? 5678 ⍴ 220
y ← ¯8000 + ? 1234 ⍴ 18000
(x∊y) ≡ x f y
1
⍳ to the Rescue
eps ← {(⎕io+≢⍵)>⍵⍳⍺}
(x∊y) ≡ x eps y
1
This solution has the advantage that ⍳ is optimized so that it would not be much slower than using ∊ directly.
Bit Table
⍝
epb←{
⎕io←0
r←(⌊/,⌈/)⍺,⍵
b←(1+-/⌽r)⍴0
b[⍵-⊃r]←1
b[⍺-⊃r]
}
(x∊y) ≡ x epb y
1
This solution is blown out of the water if the range of values in ⍺ and ⍵ is large. Otherwise, it's pretty fast.
The 1+ in the expression b←(1+-/⌽r)⍴0 is an instance of the famous "off-by-1" pitfalls waiting to trap the unwary.
Outer Product
epo ← {∨/⍺∘.=⍵}
(x∊y) ≡ x epo y
1
This solution has the advantage of being rock solid, but the disadvantage of being O(n*2).