inRange function

Test whether a number lies within range [a,b]