@PoliteProgrammer:
No, in the situation I'm programming it's only when y is EXACTLY zero (and the chance is very high, even though y is a double), so that filter wouldn't work (because I can't use "if(x==1.INF0000)", since it's not a proper value).
@Infini:
The problem is that, in order to prevent the error, that condition would have to be in an enormous loop, and would make the program slower; so if I could just fix it out of the loop it wouldn't slow down the program.
But I see, I guess it's better to prevent it anyway.