packages feed

zoom-cache 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+40/−1 lines, 2 files

Files

+ Numeric/FloatMinMax.hs view
@@ -0,0 +1,38 @@+-- | The minimum and maximum positive, finite floats.++module Numeric.FloatMinMax+( floatMin+, floatMaxDenorm+, floatMinNorm+, floatMax+)+where++import Control.Applicative+import Data.Function++-- | The minimum positive, denormalized float.+floatMin :: RealFloat a => a+floatMin = fix $ do d     <- floatDigits+                    (e,_) <- floatRange+                    pure $ encodeFloat 1 (e-d)+{-# INLINE floatMin #-}++-- | The maximum denormalized float.+floatMaxDenorm :: RealFloat a => a+floatMaxDenorm = floatMinNorm - floatMin+{-# INLINE floatMaxDenorm #-}++-- | The minimum positive, normalized float.+floatMinNorm :: RealFloat a => a+floatMinNorm = fix $ do (e,_) <- floatRange+                        pure $ encodeFloat 1 (e-1)+{-# INLINE floatMinNorm #-}++-- | The maximum finite float.+floatMax :: RealFloat a => a+floatMax = fix $ do r     <- floatRadix+                    d     <- floatDigits+                    (_,e) <- floatRange+                    pure $ encodeFloat (r^d-1) (e-d)+{-# INLINE floatMax #-}
zoom-cache.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.1.0.0+Version:             0.1.0.1  -- A short (one-line) description of the package. Synopsis:            A streamable, seekable, zoomable cache file format@@ -56,6 +56,7 @@                        Data.ZoomCache.Summary                        Data.ZoomCache.Write                        Data.Iteratee.ZoomCache+                       Numeric.FloatMinMax      -- Packages needed in order to build this package.   -- Build-depends: