Approximate equality for floating point numbers with HUnit

Version on this page:
LTS Haskell 13.22:
Stackage Nightly 2019-05-23:
Latest on Hackage:

See all snapshots HUnit-approx appears in

BSD-3-Clause licensed and maintained by Richard Eisenberg

Module documentation for


Build Status

This Haskell package provides operators to test approximate equality among numerical values, compatible with HUnit. It uses implicit variables to make for a clean interface, where approximate comparison looks like a binary operator.


HUnit-approx changelog

  • Drop support for GHCs lower than 7.2.


  • Use HasCallStack to provide better locations for errors.

  • Remove -main-is for compatibility with cabal 2.0.


  • HUnit is Safe only in GHC 7.10 and above; this modifies Safety settings accordingly.


  • Initial release: assertApproxEquals, and assertion and test combinators.
Depends on 3 packages:
Used by 1 package:
comments powered byDisqus