...
In the assignments above, it is possible that the variable d1
is outside the range of values that can be represented by a float or that the variable ld
is outside the range of values that can be represented as either a float
or a double
.
Compliant
...
Solution
This compliant code properly checks to see whether the values to be stored are too large to be represented.
...