[Haskell-cafe] [ANN] deka - decimal arithmetic
omari at smileystation.com
Sat Feb 8 20:06:18 UTC 2014
Announcing deka, a library for decimal arithmetic.
Why decimal arithmetic is important is discussed at length at
but for a short explanation, go into ghci and type:
print $ 0.1 + 0.1 + 0.1
This is 0.3, right? But on my machine I get 0.3 plus a small fraction,
which is simply not acceptable for applications where it is essential to
get exact results, such as financial applications.
deka is a binding to the decNumber C library, a thoroughly tested and fast
implementation of decimal arithmetic. deka is fully tested and I encourage
you to run the tests using the usual "cabal test" method.
deka is available at
and is on Github at
Because deka is a binding to the decNumber C library, first you will need
to install decNumber. An easy to install version with the GNU autotools is
decNumber's website is at
A literate Haskell file illustrating the use of deka is available at
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe