Copyright | (c) Masahiro Sakai 2014 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | non-portable (DeriveDataTypeable) |
Safe Haskell | Safe |
Language | Haskell2010 |
Extension of real numbers with positive/negative infinities (±∞). It is useful for describing various limiting behaviors in mathematics.
Remarks:
∞ - ∞
is left undefined as usual, but we define0 × ∞ = 0 × -∞ = 0
by following the convention of probability or measure theory.
References:
- Wikipedia contributors, "Extended real number line," Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Extended_real_number_line (accessed September 1, 2014).
Documentation
Extended r
is an extension of r with positive/negative infinity (±∞).
Instances
Functor Extended Source # | |
Bounded (Extended r) Source # | |
Eq r => Eq (Extended r) Source # | |
(Fractional r, Ord r) => Fractional (Extended r) Source # | Note that |
Data r => Data (Extended r) Source # | |
Defined in Data.ExtendedReal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Extended r -> c (Extended r) # gunfold :: (forall b r0. Data b => c (b -> r0) -> c r0) -> (forall r1. r1 -> c r1) -> Constr -> c (Extended r) # toConstr :: Extended r -> Constr # dataTypeOf :: Extended r -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Extended r)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Extended r)) # gmapT :: (forall b. Data b => b -> b) -> Extended r -> Extended r # gmapQl :: (r0 -> r' -> r0) -> r0 -> (forall d. Data d => d -> r') -> Extended r -> r0 # gmapQr :: (r' -> r0 -> r0) -> r0 -> (forall d. Data d => d -> r') -> Extended r -> r0 # gmapQ :: (forall d. Data d => d -> u) -> Extended r -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Extended r -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Extended r -> m (Extended r) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Extended r -> m (Extended r) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Extended r -> m (Extended r) # | |
(Num r, Ord r) => Num (Extended r) Source # | Note that
|
Defined in Data.ExtendedReal | |
Ord r => Ord (Extended r) Source # | |
Read r => Read (Extended r) Source # | |
Show r => Show (Extended r) Source # | |
NFData r => NFData (Extended r) Source # | |
Defined in Data.ExtendedReal | |
Hashable r => Hashable (Extended r) Source # | |
Defined in Data.ExtendedReal |
isInfinite :: Extended r -> Bool Source #
isInfinite x
returns True
iff x
is PosInf
or NegInf
.