Closed mneumann closed 1 year ago
You were probably already planning to include this here, but I'm in agreement with your comment on my other PR about using BCD for the implementation of Integer.Format.Decimal
.
Arguably its use in Integer.Format.Decimal
is the best argument for including a BCD implementation in the core library instead of as a separate standard library.
Looks like an internal error in the compiler being triggered here. I can take a look.
@jemc okay if I merge this?
Not sure if this is of any use. It emerged out of the idea of converting decimals via BCDs :)
I think what could be useful is a
BitArrayPair(T)
, that takes twoT
(e.g.U64
) and provides operations that operate on both (bit shifting, rotation etc.). Most of the complexity of the code below comes from simulating bit shifts via two U64.