Safe Haskell | Safe-Inferred |
---|
Number type based on Float with formatting in percents.
- newtype T = Cons Float
- percent :: Float -> T
- showPfix :: (RealFrac prob, Show prob) => Int -> prob -> String
- roundRel :: RealFrac a => Int -> a -> a
- (//) :: (Ord a, Show a) => Dist a -> Int -> IO ()
- (//*) :: (Ord a, Show a) => Dist a -> (Int, Int) -> IO ()
- liftP :: (Float -> Float) -> T -> T
- liftP2 :: (Float -> Float -> Float) -> T -> T -> T
- type Dist a = T T a
- type Spread a = [a] -> Dist a
- type RDist a = T (Dist a)
- type Trans a = a -> Dist a
- type Space a = Trace (Dist a)
- type Expand a = a -> Space a
- type RTrans a = a -> RDist a
- type RSpace a = T (Space a)
- type RExpand a = a -> RSpace a
Probabilities
roundRel :: RealFrac a => Int -> a -> aSource
Deprecated: was used to implemented showPfix, but is no longer needed for this purpose, and should not be exported anyway, and does not contribute to a safe way to format fixed point values, because the rounded value may not be accurate