See following three snippet code:
(*can compile*)
range = Range[-2, 2, 0.005];
Compile[{},
With[{r = range}, Table[ArcTan[x, y], {x, r}, {y, r}]]][];
(*can compile*)
Compile[{},
With[{r = Range[-2, 2, 0.005 - 10^-8]}, Table[ArcTan[x, y], {x, r}, {y, r}]]][];
(*can't compile*)
Compile[{},
With[{r = Range[-2, 2, 0.005]}, Table[ArcTan[x, y], {x, r}, {y, r}]]][];
Why the last code can't be compiled? I used Mathematica 9.0.1.