Computer Arithmetic
On some processors, computations involving many subnormal numbers can slow down dramatically. Which setting is used when performance takes priority?
- ATreating subnormal results and inputs as zero (flush-to-zero)
- BAutomatically converting all computation from double to single precision
- CStopping the program whenever a subnormal is found
Show answer and explanation
Answer: A. Treating subnormal results and inputs as zero (flush-to-zero)
Subnormals are a special form without an implied leading 1, so some processors cannot handle them in fast hardware and fall back to microcode or similar, running tens of times slower. Where values extremely close to zero need not be handled precisely, as in audio processing or AI, a flush-to-zero setting treats subnormals as zero to keep speed. The cost is lost precision near zero and loss of gradual underflow. It neither changes precision across the board nor stops the program.
- A. Correct. Treating subnormals as zero avoids the slowdown.
- B. It is not a setting that changes precision across the board.
- C. Stopping the program would halt the computation.