Skip to content

Commit

Permalink
Add denormalizedException
Browse files Browse the repository at this point in the history
The denormalizedException is set whenever a denormalized value is
manipulated or created. It is useful to know that denormalized values
are generated because it indicates that precision is low.
Further performance of denormalized number can be up to 100 times slower
even when handled in hardware (see Table 2 in "Quantifying the
Interference Caused by Subnormal Floating-Point Values" by Isaac Dooley
and Laxmikant Kale).
  • Loading branch information
Jens K. Mueller authored and Don Clugston committed Jun 30, 2011
1 parent 4496f58 commit 77aa890
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions std/math.d
Expand Up @@ -2293,16 +2293,17 @@ struct FloatingPointControl
*/
enum : uint
{
inexactException = 0x20,
underflowException = 0x10,
overflowException = 0x08,
divByZeroException = 0x04,
invalidException = 0x01,
inexactException = 0x20,
underflowException = 0x10,
overflowException = 0x08,
divByZeroException = 0x04,
denormalizedException = 0x02,
invalidException = 0x01,
/// Severe = The overflow, division by zero, and invalid exceptions.
severeExceptions = overflowException | divByZeroException
| invalidException,
allExceptions = severeExceptions | underflowException
| inexactException,
| inexactException | denormalizedException,
};
private:
enum ushort EXCEPTION_MASK = 0x3F;
Expand Down

0 comments on commit 77aa890

Please sign in to comment.