Safe Haskell | None |
---|---|
Language | Haskell2010 |
Metric structure
- class Field a => BoundedField a where
- infinity :: BoundedField a => a
- neginfinity :: BoundedField a => a
- class Metric a b where
- class Normed a b where
- class (AdditiveUnital a, AdditiveGroup a, Multiplicative a) => Signed a where
- class AdditiveGroup a => Epsilon a where
- (≈) :: Epsilon a => a -> a -> Bool
- class Ring a => QuotientField a where
Metric
class Field a => BoundedField a where Source #
providing the concepts of infinity and NaN, thus moving away from error throwing
BoundedField Double Source # | |
BoundedField Float Source # | |
(Foldable r, Representable r, BoundedField a) => BoundedField (r a) Source # | |
infinity :: BoundedField a => a Source #
prints as Infinity
neginfinity :: BoundedField a => a Source #
prints as `-Infinity`
class Normed a b where Source #
Normed is a current wart on the NumHask api, causing all sorts of runaway constraint boiler-plate.
class (AdditiveUnital a, AdditiveGroup a, Multiplicative a) => Signed a where Source #
abs and signnum are also warts on the standard Num
class, and are separated here to provide a cleaner structure.
class AdditiveGroup a => Epsilon a where Source #
This should probably be split off into some sort of alternative Equality logic, but to what end?