[Haskell-cafe] [ANN] deka - decimal arithmetic

Roman Cheplyaka roma at ro-che.info
Sat Feb 8 21:12:11 UTC 2014


* Omari Norman <omari at smileystation.com> [2014-02-08 15:46:49-0500]
> On Sat, Feb 8, 2014 at 3:39 PM, Nicolas Trangez <nicolas at incubaid.com>wrote:
> 
> > Note there's some existing support for this in `base`:
> >
> > On Sat, 2014-02-08 at 15:06 -0500, Omari Norman wrote:
> > > but for a short explanation, go into ghci and type:
> > >
> > > print $ 0.1 + 0.1 + 0.1
> >
> > λ print $ (0.1 + 0.1 + 0.1 :: Double)
> > 0.30000000000000004
> >
> > λ :m + Data.Fixed
> >
> 
> Key word there is "Fixed"; deka supports floating point with up to 34
> digits of precision but

So it is fixed, too? I'm not sure "Fixed" qualifies as a key word, then :)

Note that Data.Fixed doesn't put any restrictions on the (fixed)
precision. You could easily define E34.

So yeah, a comparison with Data.Fixed would be nice to see.
Is deka faster? By how much? Does it support any additional operations?
Which ones?

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140208/a96635a2/attachment.sig>


More information about the Haskell-Cafe mailing list