
Answers 249
This sort of problem occurs on most machines with a floating-point
processor. On the other hand, if you have an old machine that uses soft-
ware to do the floating-point, you’ll probably get the right answer. That’s
because, in general, software floating-point uses only enough bits to do the
work.
To fix the program, we need to turn the main loop into:
while (1)
{
// Volatile keeps the optimizer from
// putting the result in a register
volatile float result;
result = number1 + number2;
if (result == number1)
break;
Answer 74: The problem is that the words are stored in the input file in alpha-
betical order and the tree is unbalanced. Thus, when ...