
30 Mar
2008
30 Mar
'08
2:57 p.m.
I've just uploaded version 0.1.0 of a decimal arithmetic package to Hackage. Decimal numbers are stored as an Integral mantissa and a Word8 exponent, where the number stored is mantissa * 10^(-exponent). In other words the exponent is the number of decimal places stored. There are also routines for partitioning a value such that the sum of the parts is equal to the original value. This is useful in financial arithmetic. This came out of my ongoing work on an AMQP binding for Haskell. Version 0-10 of the AMQP spec includes decimal fractions defined in this way for financial applications, so I thought I'd make a proper job of it. A darcs repository will be set up shortly. Paul.
6261
Age (days ago)
6261
Last active (days ago)
0 comments
1 participants
participants (1)
-
Paul Johnson