I am getting incorrect results with division when using -ffast-math. Here is what I have to work with:
This works great as long as -ffast-math isn't enabled.
//get frame count
frame_count = ((double)duration/(double)time_units) * (double)frame_rate;
Is there another way I can calculate frame_count that uses only integers? Perhaps multiplying everything by 1000 (to increase precision) and then do the calculations using integers?