Why isn't this working? I always get a value that's too high. 4 would give me the correct value, but 9 up always goes over. It's kind of weird too, every perfect square makes it go over a little less, you can check it out and see what I mean.
Code:
float sqrt(unsigned int tar, float accr)
{
float i;
for (i=0.0f;i<tar;i+=accr)
{
if (i*i >= tar)
return i;
}
}