Copyright | (c) Ross Paterson 2022 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | [email protected] |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.YAP.Logarithm
Description
An example instance of the algebraic classes: a logarithm adaptor.
Synopsis
- data Logarithm a
- logarithm :: (Eq a, AdditiveMonoid a) => a -> Logarithm a
- exponential :: Logarithm a -> a
Documentation
Formal logarithm type adaptor: addition and subtraction become multiplication and division on the underlying type.
Instances
Show a => Show (Logarithm a) Source # | |
Eq a => Eq (Logarithm a) Source # | |
Ord a => Ord (Logarithm a) Source # | |
Defined in Data.YAP.Logarithm | |
Semifield a => AbelianGroup (Logarithm a) Source # | |
Semiring a => AdditiveMonoid (Logarithm a) Source # | |
exponential :: Logarithm a -> a Source #
inverse of logarithm
.