[erlang-questions] Any way to correct the round off errors?
Sun Sep 20 18:12:31 CEST 2009
Dnia 2009-09-20, nie o godzinie 18:06 +0200, Masklinn pisze:
> On 20 Sep 2009, at 17:22 , Witold Baryluk wrote:
> > If you want something which calculates correctly in decimal number,
> > use
> > integers multiplied with some 10^k power. It is called fixed point
> > arithmetic.
> Or use a decimal floating-point library such as gmp.
Sure. But considering that Erlang already have arbitrary precision
integers, writing few functions for add/sub/mul/div isn't very hard :)
It will be more portable than linking to gmp, :) Still operations will
need to be called explicitly, because Erlang doesn't have operator
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: To jest cz??? wiadomo?ci podpisana cyfrowo
More information about the erlang-questions