-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Half-precision floating-point
--   
--   Half-precision floating-point.
@package half
@version 0.3

-- | 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.
module Numeric.Half
newtype {-# CTYPE "unsigned short" #-} Half
Half :: CUShort -> Half
[getHalf] :: Half -> CUShort

-- | Is this Half equal to 0?
isZero :: Half -> Bool

-- | Convert a Half to a Float while preserving NaN
fromHalf :: Half -> Float

-- | Convert a Float to a Half with proper rounding, while
--   preserving NaN and dealing appropriately with infinity
toHalf :: Float -> Half

-- | Positive infinity
pattern POS_INF :: () => () => Half

-- | Negative infinity
pattern NEG_INF :: () => () => Half

-- | Quiet NaN
pattern QNaN :: () => () => Half

-- | Signalling NaN
pattern SNaN :: () => () => Half

-- | Smallest positive half
pattern HALF_MIN :: () => () => Half

-- | Smallest positive normalized half
pattern HALF_NRM_MIN :: () => () => Half

-- | Largest positive half
pattern HALF_MAX :: () => () => Half

-- | Smallest positive e for which half (1.0 + e) != half (1.0)
pattern HALF_EPSILON :: () => () => Half

-- | Number of base 10 digits that can be represented without change
pattern HALF_DIG :: forall a. (Eq a, Num a) => () => a
pattern HALF_MIN_10_EXP :: forall a. (Eq a, Num a) => () => a
pattern HALF_MAX_10_EXP :: forall a. (Eq a, Num a) => () => a
instance GHC.Generics.Generic Numeric.Half.Half
instance Control.DeepSeq.NFData Numeric.Half.Half
instance Foreign.Storable.Storable Numeric.Half.Half
instance GHC.Show.Show Numeric.Half.Half
instance GHC.Read.Read Numeric.Half.Half
instance GHC.Classes.Eq Numeric.Half.Half
instance GHC.Classes.Ord Numeric.Half.Half
instance GHC.Real.Real Numeric.Half.Half
instance GHC.Real.Fractional Numeric.Half.Half
instance GHC.Real.RealFrac Numeric.Half.Half
instance GHC.Float.Floating Numeric.Half.Half
instance GHC.Float.RealFloat Numeric.Half.Half
instance GHC.Num.Num Numeric.Half.Half
instance Language.Haskell.TH.Syntax.Lift Numeric.Half.Half
