BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:log-domain-0.13.2@sha256:1334d926bc07986ce520c0a5c64c5431ec5d95a9444dff327d035452bd41866b,1795

Module documentation for 0.13.2


Hackage Build Status

What rolls down stairs alone or in pairs Rolls over your neighbor’s dog? What’s great for a snack and fits on your back? It’s Log, Log, Log!

It’s Log, Log, it’s big, it’s heavy, it’s wood. It’s Log, Log, it’s better than bad, it’s good! Everyone wants a log! You’re gonna love it, Log! Come on and get your log! Everyone needs a Log!”

– Ren & Stimpy, The Log Song

This package provides log-domain floats, doubles and complex numbers.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on

-Edward Kmett


0.13.2 [2021.11.15]

  • Add an Eq1 Log instance.
  • Allow building with hashable-1.4.*.

0.13.1 [2021.02.17]

  • The build-type has been changed from Custom to Simple. To achieve this, the doctests test suite has been removed in favor of using cabal-docspec to run the doctests.

0.13 [2019.11.21]

  • Replace dependency on Precise with standard functions available from base 4.9 onward.

0.12 [2018.01.18]

  • Add Semigroup instance for Log.
  • Drop safecopy support
  • Removed some unused constraints.


  • Support doctest-0.12


  • Revamp Setup.hs to use cabal-doctest. This makes it build with Cabal-2.0, and makes the doctests work with cabal new-build and sandboxes.


  • Replace use of Hashable1 from hashable-extras in favor of Hashable from hashable- As a result, the hashable-extras dependency has been removed.
  • On Windows, we now use the FFI to link against the C math library if building with GHC 8.0 or later, which features a much improved runtime linker story.
  • Remove generic-deriving dependency

  • Support safecopy 0.9


  • Work around an issue with safecopy on GHC 7.10
  • Changed the repository link to my ekmett github account from analytics.

  • Add vector 0.11 support.


  • Add generic-deriving 1.8 support. We also no longer incur a generic-deriving dependency at all on GHC 7.6+

  • Compiles warning-free on GHC 7.10


  • semigroupoids 5 support.

  • Improved the stability and portability of the doctest test suite


  • (**) is now much more accurately defined.
  • We now avoid comparisons for equality with infinities.
  • Fixed a bug in negate.
  • On windows we avoid FFI into the math library, and accept less accurate results. (Sorry!)


  • Fixed subtraction again. For real this time.

  • Support generic-deriving 1.7


  • Fixed subtraction better.


  • Fixed subtraction.


  • Updated to comonad and semigroupoids 4.


  • Dependency bump to allow comonad and semigroupoids 4.0


  • Marked Numeric.Log Trustworthy.


  • Renamed the data constructor to Exp and the field accessor to ln per issue #1.

  • Wider bounds for generic-deriving so we can build with GHC HEAD.


  • Switched the Hashable1 instance to use the new, lighter, hashable-extras


  • instance Hashable1 Log

  • Wider binary version bound


  • Added support for cereal.


  • Added an Enum instance.
  • Added sum to calculate using the log-sum-exp trick.

  • Minor packaging changes


  • Renamed from log to log-domain due to internal hackage issues rendering that name inaccessible.
  • Ported Numeric.Log from analytics at the request of @bgamari