We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 789ada5 commit 87c177cCopy full SHA for 87c177c
stdlib/public/core/Integers.swift
@@ -3010,9 +3010,7 @@ extension FixedWidthInteger {
3010
let minBitWidth = source.significandWidth
3011
let isExact = (minBitWidth <= exponent)
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:
+ // Determine the number of meaningful bits in the significand bit pattern.
3016
let bitWidth = minBitWidth &+ bitPattern.trailingZeroBitCount
3017
let shift = exponent - Source.Exponent(bitWidth)
3018
// Use `Self.Magnitude` to prevent sign extension if `shift < 0`.
0 commit comments