in reply to matching a number

It looks like what you want is to search for a range.

Example:
if (($input - 0.1) <= $1 && $1 <= ($input + 0.1)) { <insert code here>; }