How to decide whether a number is inside of wrapped (modular) interval

71 Views Asked by At

I am having a problem a finding a suitable formula for deciding whether a number falls inside of modular interval. Example:

Let's use $mod$ $100$ and the interval $\langle 90, 10\rangle$. How would you compute if the number $95$ or $0$ falls into the interval or not? In other words is there an expression that would be true for all the numbers in the interval?

1

There are 1 best solutions below

0
On BEST ANSWER

If I have interpreted the term "wrapped" correctly, $\langle90,10\rangle$ is the same as $\langle−10,10\rangle$ which doesn't require any wrapping. Check whether the number modulo $100$ falls in this interval.