How do I divide two integers to get a double?
Convert one of them to a double first. This form works in many languages:
real_result = (int_numerator + 0.0) / int_denominator