Copyright | (c) Masahiro Sakai 2014 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | non-portable (DeriveDataTypeable) |
Safe Haskell | Safe-Inferred |
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) Source # gunfold :: ( forall b r0. Data b => c (b -> r0) -> c r0) -> ( forall r1. r1 -> c r1) -> Constr -> c ( Extended r) Source # toConstr :: Extended r -> Constr Source # dataTypeOf :: Extended r -> DataType Source # dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Extended r)) Source # dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Extended r)) Source # gmapT :: ( forall b. Data b => b -> b) -> Extended r -> Extended r Source # gmapQl :: (r0 -> r' -> r0) -> r0 -> ( forall d. Data d => d -> r') -> Extended r -> r0 Source # gmapQr :: forall r0 r'. (r' -> r0 -> r0) -> r0 -> ( forall d. Data d => d -> r') -> Extended r -> r0 Source # gmapQ :: ( forall d. Data d => d -> u) -> Extended r -> [u] Source # gmapQi :: Int -> ( forall d. Data d => d -> u) -> Extended r -> u Source # gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Extended r -> m ( Extended r) Source # gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Extended r -> m ( Extended r) Source # gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Extended r -> m ( Extended r) Source # |
|
( Num r, Ord r) => Num ( Extended r) Source # |
Note that
|
Defined in Data.ExtendedReal (+) :: Extended r -> Extended r -> Extended r Source # (-) :: Extended r -> Extended r -> Extended r Source # (*) :: Extended r -> Extended r -> Extended r Source # negate :: Extended r -> Extended r Source # abs :: Extended r -> Extended r Source # signum :: Extended r -> Extended r Source # fromInteger :: Integer -> Extended r Source # |
|
Ord r => Ord ( Extended r) Source # | |
Defined in Data.ExtendedReal compare :: Extended r -> Extended r -> Ordering Source # (<) :: Extended r -> Extended r -> Bool Source # (<=) :: Extended r -> Extended r -> Bool Source # (>) :: Extended r -> Extended r -> Bool Source # (>=) :: Extended r -> Extended r -> Bool 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 # | |
isInfinite :: Extended r -> Bool Source #
isInfinite x
returns
True
iff
x
is
PosInf
or
NegInf
.