Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Subnormal Numbers

A normalized number is a number for which both the exponent (including bias) and the most significant bit of the mantissa are non-zero. For such numbers, all the bits of the mantissa contribute to the precision of the representation.

The smallest normalized single-precision floating-point number greater than zero is about 1.1754943-38. Smaller numbers are possible, but those numbers must be represented with a zero exponent and a mantissa whose leading bit(s) are zero, which leads to a loss of precision. These numbers are called subnormal numbers or subnormals(older specifications refer to these as denormal numbers).

Subnormal computations use hardware and/or operating system resources to handle subnormals; these can cost hundreds of clock cycles. Subnormal computations take much longer to calculate than normal computations.

In general, avoid subnormals and increase the performance of your application in the following ways:

  • Scale the values into the normalized range.
  • Use a higher precision data type with a larger range.
  • Flush subnormals to zero.

In most cases, you can expect subnormals to be flushed to zero by the hardware.