Copyright | (C) 2014 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | PatternSynonyms |
Safe Haskell | None |
Language | Haskell98 |
Half-precision floating-point values. These arise commonly in GPU work and it is useful to be able to compute them and compute with them on the CPU as well.
- newtype Half = Half {}
- isZero :: Half -> Bool
- fromHalf :: Half -> Float
- toHalf :: Float -> Half
- pattern POS_INF :: Half
- pattern NEG_INF :: Half
- pattern QNaN :: Half
- pattern SNaN :: Half
- pattern HALF_MIN :: Half
- pattern HALF_NRM_MIN :: Half
- pattern HALF_MAX :: Half
- pattern HALF_EPSILON :: Half
- pattern HALF_DIG :: forall a. (Num a, Eq a) => a
- pattern HALF_MIN_10_EXP :: forall a. (Num a, Eq a) => a
- pattern HALF_MAX_10_EXP :: forall a. (Num a, Eq a) => a
Documentation
Eq Half Source # | |
Floating Half Source # | |
Fractional Half Source # | |
Num Half Source # | |
Ord Half Source # | |
Read Half Source # | |
Real Half Source # | |
RealFloat Half Source # | |
RealFrac Half Source # | |
Show Half Source # | |
Generic Half Source # | |
Lift Half Source # | |
Storable Half Source # | |
NFData Half Source # | |
type Rep Half Source # | |
pattern HALF_NRM_MIN :: Half Source #
Smallest positive normalized half
pattern HALF_EPSILON :: Half Source #
Smallest positive e for which half (1.0 + e) != half (1.0)
pattern HALF_DIG :: forall a. (Num a, Eq a) => a Source #
Number of base 10 digits that can be represented without change
pattern HALF_MIN_10_EXP :: forall a. (Num a, Eq a) => a Source #
pattern HALF_MAX_10_EXP :: forall a. (Num a, Eq a) => a Source #