tmp/tmpgcg7w598/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
## Floating-integral conversions <a id="conv.fpint">[[conv.fpint]]</a>
|
| 2 |
|
| 3 |
A prvalue of a floating-point type can be converted to a prvalue of an
|
| 4 |
integer type. The conversion truncates; that is, the fractional part is
|
| 5 |
discarded. The behavior is undefined if the truncated value cannot be
|
| 6 |
represented in the destination type.
|
|
@@ -14,11 +14,12 @@ possible. If the value being converted is in the range of values that
|
|
| 14 |
can be represented but the value cannot be represented exactly, it is an
|
| 15 |
*implementation-defined* choice of either the next lower or higher
|
| 16 |
representable value.
|
| 17 |
|
| 18 |
[*Note 2*: Loss of precision occurs if the integral value cannot be
|
| 19 |
-
represented exactly as a value of the floating
|
|
|
|
| 20 |
|
| 21 |
If the value being converted is outside the range of values that can be
|
| 22 |
represented, the behavior is undefined. If the source type is `bool`,
|
| 23 |
the value `false` is converted to zero and the value `true` is converted
|
| 24 |
to one.
|
|
|
|
| 1 |
+
### Floating-integral conversions <a id="conv.fpint">[[conv.fpint]]</a>
|
| 2 |
|
| 3 |
A prvalue of a floating-point type can be converted to a prvalue of an
|
| 4 |
integer type. The conversion truncates; that is, the fractional part is
|
| 5 |
discarded. The behavior is undefined if the truncated value cannot be
|
| 6 |
represented in the destination type.
|
|
|
|
| 14 |
can be represented but the value cannot be represented exactly, it is an
|
| 15 |
*implementation-defined* choice of either the next lower or higher
|
| 16 |
representable value.
|
| 17 |
|
| 18 |
[*Note 2*: Loss of precision occurs if the integral value cannot be
|
| 19 |
+
represented exactly as a value of the floating-point
|
| 20 |
+
type. — *end note*]
|
| 21 |
|
| 22 |
If the value being converted is outside the range of values that can be
|
| 23 |
represented, the behavior is undefined. If the source type is `bool`,
|
| 24 |
the value `false` is converted to zero and the value `true` is converted
|
| 25 |
to one.
|