Re: Aproximate
While mathematically speaking, 3.999999.... == 4, using a computer to perform a comparison will indicate a difference. (After all, computers can't do infinite-precision floating point...) So, if your code contains if (x==4), and x=3.99999999999, then the result is 'false', not 'true'. It's always best to round to a couple decimal places beyond the smallest expected difference (if your values are 3.5 to 4.5, round to 3.9999) and THEN do the comparison.