Question 7 22 pts
In your first industry job, your boss asks you to write a program to average all the IEEE 754 single-precision (32-bit) floating-point numbers
stored in binary representation in a file. So, you write a program that sums the values and divides by the number of values, and the
average it prints happens to be approximately 3.14. Unfortunately, when you give that to your boss, he explains that he didn't want the
mean, but the median value. No problem; you write a second program that computes the median by using bitonic sort to put the numbers
into decreasing order and then returns the value from the middle of the sorted file. That returns 8100.5, which your boss thinks is
suspiciously far from the mean. To make sure that your sort didn't accidentally change the values, he runs your original mean program on
the now sorted file and it prints 12462.7 -- which is not even close to the 3.14 it got from the original file. So, your boss asks you to explain
why your mean program now gives a different answer. Assuming both your programs are correct, what happened?
Would there be a similar problem if you were doing this with 32-bit 2's complement integer values instead of floats?