[Haskell-cafe] ANN: logfloat 0.12.1

wren ng thornton wren at freegeek.org
Thu Apr 1 01:51:58 EDT 2010


--------------------------------------------
-- logfloat 0.12.1
--------------------------------------------

This package provides a type for storing numbers in the log-domain, 
primarily useful for preventing underflow when multiplying many 
probabilities as in HMMs and other probabilistic models. The package 
also provides modules for dealing with floating numbers correctly.

--------------------------------------------
-- Changes since 0.12.0.1
--------------------------------------------

* Fixed a number of bugs where LogFloat values would become NaN when 
they should not. These bugs involved using normal-space positive 
infinity and so would not affect clients using the package for 
probabilities.

The fixes do introduce some extra checks though. If anyone is using the 
package for probabilities in a large enough project and could run some 
benchmarks to see how 0.12.1 compares to 0.12.0.1 I'd love to hear the 
results. (I'm not sure that doing microbenchmarks would actually give 
much insight about real programs.) If the overhead is bad enough I can 
add a LogProb type which ensures things are proper probabilities in 
order to avoid the new checks.



--------------------------------------------
-- Compatibility / Portability
--------------------------------------------

The package is compatible with Hugs (September 2006) and GHC (6.8, 6.10, 
6.12). For anyone still using GHC 6.6, the code may still work if you 
replace LANGUAGE pragma by equivalent OPTIONS_GHC pragma.

The package is not compatible with nhc98 and Yhc because 
Data.Number.RealToFrac uses MPTCs. The other modules should be compatible.


--------------------------------------------
-- Links
--------------------------------------------

Homepage:
     http://code.haskell.org/~wren/

Hackage:
     http://hackage.haskell.org/cgi-bin/hackage-scripts/package/logfloat

Darcs:
     http://code.haskell.org/~wren/logfloat/

Haddock (Darcs version):
     http://code.haskell.org/~wren/logfloat/dist/doc/html/logfloat/

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list