> On Jul 3, 2016, at 9:20 PM, Brent Royal-Gordon <[email protected]> wrote:
>
> for i in 0 ..< countRepresentedWords {
> let word = value.word(at: i)
>
> bits &<<= word.bitWidth
> bits |= Magnitude(truncatingOrExtending: word)
> }
Tangentially, I now realize that this was totally backwards. Should be more
like:
for i in 0 ..< countRepresentedWords {
let word = value.word(at: i)
let shift = i * word.bitWidth
bits |= Magnitude(truncatingOrExtending: word)
&<< shift
}
Always fun when your dumb mistakes get sent to large numbers of people.
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution