You are running out of accuracy. Floats don't have much precision, if you want more decimals, use the double data type.
Also, it seems that you are using printf() and co. to display numbers - if you ever decided to use double instead of float s, remember to change the format specifiers from %f to %lf - for double.
user529758
source share