A robust version of findInterval where the inputs are rounded off first to avoid floaring point issues

findInterval_AfterRound(x, vec, digits = 10, ...)

Arguments

x

numeric.

vec

numeric, sorted (weakly) increasingly, of length N, say.

digits

Integer: The number of digits to round x and vec to before applying findInterval.

...

Passed to findInterval.