half-0.2.1: Half-precision floating-point

Copyright(C) 2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
PortabilityPatternSynonyms
Safe HaskellNone
LanguageHaskell98

Numeric.Half

Description

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.

Synopsis

Documentation

isZero :: Half -> Bool Source

Is this Half equal to 0?

fromHalf :: Half -> Float Source

Convert a Half to a Float while preserving NaN

toHalf :: Float -> Half Source

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

POS_INF

NEG_INF

QNaN

SNaN

HALF_MIN

HALF_NRM_MIN

HALF_MAX

HALF_EPSILON

HALF_DIG

HALF_MIN_10_EXP

HALF_MAX_10_EXP