[Haskell-cafe] What is a safe Haskell data type to store and manipulate Money values?
dct25-561bs at mythic-beasts.com
Tue Apr 4 14:44:14 UTC 2017
`Data.Decimal.Decimal` is quite close to Java's `BigDecimal` in intent but
not quite the same: Java's `BigDecimal` has a 32-bit signed exponent
whereas Haskell's `Decimal`'s exponent is 8-bit and unsigned. The
difference shouldn't matter for the purposes of tracking money since
accountancy rules are generally designed to prefer (carefully specified)
rounding over keeping track of numbers with hundreds of decimal places.
On 4 April 2017 at 15:13, ALeX Kazik <alex at kazik.de> wrote:
> > Leaving aside the legal aspects of this, what would be Haskell's
> > of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe