Getting some weird results from printf.
double scale = 129 / 1024;
printf("%f \n", scale);
is printing either -0.000000, 0.000000 or some huge random number like 947634637338383939387378370000000000000.00000. It seems to randomly alternate between these each time i compile and run. There is a lot more to the program, but i can't figure out what could possibly be affecting printf in this situation. This is exactly how these two statements appear in my program. What have i done?