File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3010,7 +3010,10 @@ extension FixedWidthInteger {
30103010 let minBitWidth = source. significandWidth
30113011 let isExact = ( minBitWidth <= exponent)
30123012 let bitPattern = source. significandBitPattern
3013- // Determine the number of meaningful bits in the significand bit pattern.
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:
30143017 let bitWidth = minBitWidth &+ bitPattern. trailingZeroBitCount
30153018 let shift = exponent - Source. Exponent ( bitWidth)
30163019 // Use `Self.Magnitude` to prevent sign extension if `shift < 0`.
You can’t perform that action at this time.
0 commit comments