DavidVorick/Sia — pull request #5 by lukechampine (2014-06-24 19:26:40+00:00)
Title: Balance arithmetic

`Balance` is now implemented as a `[16]byte`. Arithmetic is handled by using `big.Int` as an intermediary. To facilitate this, `EncUint128()` and `DecUint128()` were added to siaencoding. Tests were added to ensure arithmetic works. Finally, the wallet balances are now printed as one number during compile.

I'm not sure how this new scheme compares to the old one efficiency-wise. I imagine that `Add()` and `Subtract()` may have suffered a bit, but `Multiply()` is almost certainly more efficient than any manual algorithm we would have written. The benefits will become even more apparent when we have to write `Divide()`.