I am using C printf to print doubles and found the rounding is inconsistent. Sometimes it will not round up with certain values.
double t = 16.125;
printf("%-10.2lf", t);
This prints 16.12. I thought it would round up to 16.13.
double t = 16.135;
printf("%-10.2lf", t);
This prints 16.14. This is what I thought would happen for all cases.