may lose precision because it is replaced by a denormalized number or zero of
the same sign).
• If the value is an element of the double-extended-exponent value set, then the
implementation may, at its option, map the value to the nearest element of the
double value set. This conversion may result in overflow (in which case the value
is replaced by an infinity of the same sign) or underflow (in which case the value
may lose precision because it is replaced by a denormalized number or zero of
the same sign).
Within an FP-strict expression (§15.4), value set conversion does not provide any
choices; every implementation must behave in the same way:
• If the value is of type float and is not an element of the float value set, then the
implementation must map the value to the nearest element of the float value set.
This conversion may result in overflow or underflow.
• If the value is of type double and is not an element of the double value set, then
the implementation must map the value to the nearest element of the double value
set. This conversion may result in overflow or underflow.
Within an FP-strict expression, mapping values from the float-extended-exponent
value set or double-extended-exponent value set is necessary only when a method
is invoked whose declaration is not FP-strict and the implementation has chosen to
represent the result of the method invocation as an element of an extended-exponent
value set.
Whether in FP-strict code or code that is not FP-strict, value set conversion always
leaves unchanged any value whose type is neither float nor double.
5.2 Assignment Contexts
Assignment contexts allow the value of an expression to be assigned (§15.26) to a
variable; the type of the expression must be converted to the type of the variable.
Assignment contexts allow the use of one of the following:
• an identity conversion (§5.1.1)
• a widening primitive conversion (§5.1.2)
• a widening reference conversion (§5.1.5)
• a boxing conversion (§5.1.7) optionally followed by a widening reference
conversion