...
A subnormal number is a nonzero number that does not use all of its precision bits [IEEE 754 20082006 ]. They can be used to represent values that are closer to 0 than the smallest normal number (one that uses all of its precision bits). However, the asin()
, asinh()
, atan()
, atanh()
, and erf()
functions may produce range errors specifically when passed a subnormal number. When evaluated with a subnormal number, these functions can produce an inexact, subnormal value, which is an underflow error. The C Standard, 7.12.1, paragraph 6 [ISO/IEC 9899:2011], defines the following behavior for floating-point underflow:
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
CERT C Secure Coding Standard | FLP03-C. Detect and handle floating-point errors |
MITRE CWE | CWE-682, Incorrect Calculation |
...
[ISO/IEC 9899:2011] | 7.3.2, "Conventions" |
[IEEE 754 20082006 ] | |
[Plum 1985] | Rule 2-2 |
[Plum 1989] | Topic 2.10, "conv—Conversions and Overflow" |
[UNIX 1992] | System V Interface Definition (SVID3) |
...