Computer Arithmetic

On some processors, computations involving many subnormal numbers can slow down dramatically. Which setting is used when performance takes priority?

  1. AFlushing subnormal results to zero (FTZ) or treating subnormal inputs as zero (DAZ)
  2. BAutomatically converting all computation from double to single precision
  3. CStopping the program whenever a subnormal is found
Show answer and explanation

Answer: A. Flushing subnormal results to zero (FTZ) or treating subnormal inputs as zero (DAZ)

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, which can slow them down considerably. Where values extremely close to zero need not be handled precisely, as in audio processing or AI, FTZ or DAZ settings treat 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.