Could you please explain the above code a bit further?
This really seems puzzling.
Code:
while(fnum > MAXFLOAT) {
fnum /= 1.000001;
}
/*
fnum /= 4 would be the same thing as :
fnum = fnum / 4
C has this shorthand for all the arithmetic operators:
fnum += 1 is the same as
fnum = fnum + 1
fnum *= 2 is the same as
fnum = fnum * 2
fnum -= 2 is the same as
fnum = fnum - 2
Wouldnt this crash the program? A float passing its max limit...
Yes - but only if you go too far! :)
And my program seems to get stuck counting after the first loop.
What number should i then put instead of 1.00001 to be faster?
Code:
while(fnum < MAXFLOAT) {
fnum *= 1.000001;
}