File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3010,9 +3010,10 @@ extension FixedWidthInteger {
3010
3010
let minBitWidth = source. significandWidth
3011
3011
let isExact = ( minBitWidth <= exponent)
3012
3012
let bitPattern = source. significandBitPattern
3013
- // `RawSignificand.bitWidth` is not available if `RawSignificand` does not
3014
- // conform to `FixedWidthInteger`; we can compute this value as follows if
3015
- // `source` is finite:
3013
+ // Determine the actual number of fractional significand bits.
3014
+ // `Source.significandBitCount` would not reflect the actual number of
3015
+ // fractional significand bits if `Source` is not a fixed-width floating-point
3016
+ // type; we can compute this value as follows if `source` is finite:
3016
3017
let bitWidth = minBitWidth &+ bitPattern. trailingZeroBitCount
3017
3018
let shift = exponent - Source. Exponent ( bitWidth)
3018
3019
// Use `Self.Magnitude` to prevent sign extension if `shift < 0`.
You can’t perform that action at this time.
0 commit comments