[Haskell-cafe] ANN: ieee version 0.7

Patrick Perry patperry at gmail.com
Sun Sep 19 21:49:08 EDT 2010


ieee is a Haskell library for dealing with IEEE floating numbers.  It
was originally written to make testing with floating point values less
painful.  The library provides an "approximate equality" type class,
AEq, with approximate equality operator "~==".  One property of "~=="
is that nearby floating point numbers are deemed equivalent, so that,
for example, "1 ~== 1.00000001" evaluates to True.

Documentation is on hackage: http://hackage.haskell.org/package/ieee

Changes since the last release:

* Add IEEE type class with instances for Double, Float, CDouble, and CFloat

* Add functions for getting/setting NaN payloads

* Add succIEEE/predIEEE for advancing up and down the IEEE number line
  (ported from Tango's nextUp and nextDown)

* Add bisectIEEE for midpoints of two numbers on the IEEE number line
  (ported from Tango's ieeeMean)

* Add identicalIEEE for exact (bitwise) equality of IEEE numbers

* Add copySign for setting the sign bit of an IEEE number

* Add sameSignificandBits for seeing how many significand bits of two
  IEEE numbers agree, ported from Tango's feqrel

* Add nan, infinity, maxFinite, minNormal constants for IEEE numbers

* Add maxNum and minNum

* Rename maxF and minF to maxNaN and minNaN

* Switch to a simpler "~==" comparison for complex numbers

* Make "~==" comparison use sameSignificandBits for IEEE types

* Make "===" comparison use bitwise equality for IEEE types

* Remove old "eqRel" comparisons.

* Remove old epsilon' and delta constants

* Remove (RealFloat a) => AEq (Complex a) instance in favor of explicit
  instances for Complex {Double,Float,CDouble,CFloat}


More information about the Haskell-Cafe mailing list