HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehalf-0.3.3Haskell2010

Numeric.Half.Internal

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.

  • 1 type
  • 5 values
  • Packagehalf-0.3.3
  • Exports17
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs
newtypenewtype Half
#

A half-precision floating point value

Constructors

Instances16Eq, Floating, Fractional, Num, Ord, Read, …
valuetoHalf :: Float -> Half
#

Convert a Float to a Half with proper rounding, while preserving NaN and dealing appropriately with infinity

Patterns

11 declarations
patternpattern SNaN :: Half
#

Signalling NaN

patternpattern HALF_EPSILON :: Half
#

Smallest positive e for which half (1.0 + e) != half (1.0)

patternpattern HALF_DIG :: (Eq a, Num a) => a
#

Number of base 10 digits that can be represented without change

patternpattern HALF_MIN_10_EXP :: (Eq a, Num a) => a
#

Minimum positive integer such that 10 raised to that power is a normalized half

patternpattern HALF_MAX_10_EXP :: (Eq a, Num a) => a
#

Maximum positive integer such that 10 raised to that power is a normalized half

Pure conversions

2 declarations