PaulJohnson/Haskell-Decimal — pull request #5 by massysett (2014-01-10 17:20:13+00:00)
Title: Add tests for the size of the exponent

I was wondering how Decimal determines the size of
the exponent when performing division, so I added
some tests. The tests hold true for addition and
subtraction, but they fail for multiplication and
division. Data.Decimal states that "Binary
arithmetic results have an exponent equal to the
maximum of the exponents of the arguments", but
currently this is not true.

Mostly I was concerned with operations inadvertently overflowing the Word8 exponent. From the haddocks and the properties I can't tell whether this would be a problem. I'm not sure whether the fix for the inconsistency these tests reveal is to a) update the docs or b) change the library's behavior to conform to the docs.