The compiler defaults to using integers for calculations. The division is done using integers, then the answer is converted from an integer to a float.
You need to tell the compiler that at least one of the numbers is a float, easily done as follows:
frequency = 1000000.0/9942.0;