[Haskell-cafe] Directed rounding in haskell ?

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Apr 14 22:05:21 UTC 2014

On 11/04/2014, at 2:15 AM, Alp Mestanogullari wrote:

> Maybe these packages could be relevant/useful:
> - https://github.com/ekmett/rounded
> - https://github.com/ekmett/intervals

The latter of these has a rich interface, but

  I a b + I a' b' = (a + a') ... (b + b')
  _ + _ = Empty

(Numeric.Interval.Internal.hs) does not do the
necessary directed rounding.

The package looks like an excellent way to deal with
intervals of exact numbers, but for floating point
numbers it's not at all what one usually intends.

More information about the Haskell-Cafe mailing list