Half-precision floating-point http://github.com/ekmett/half

Version on this page:0.3
LTS Haskell 13.22:0.3
Stackage Nightly 2019-05-22:0.3
Latest on Hackage:0.3

See all snapshots half appears in

BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett

Module documentation for 0.3

There are no documented modules for this package.


Hackage Build Status

This package supplies half-precision floating point values w/ 1 bit of sign, 5 bits of exponent, 11 bits of mantissa trailing a leading 1 bit with proper underflow.

These arise commonly in GPU applications.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett



  • Fixed bound in floatRange.
  • Fixed decodeFloat.
  • Added a Lift instance for Half for template-haskell support.

  • Avoid the new warnings for missing pattern synonym signatures on GHC 8

  • Fixed an issue with Storable that was causing crashing for some users.

  • Added support for older GHCs still. unsafeShiftR was only added in 7.4.


  • Fixed isInfinite.
  • Added support for older GHCs. On GHC < 7.8 the pattern synonyms are disabled.


  • Removed need for GeneralizedNewtypeDeriving and ScopedTypeVariables.

  • Fixed source repository location


  • Renamed toFloat to fromHalf for easier unqualified use.
  • Added a Read instance.


  • Added a CTYPE to the Half declaration so that it can be used with CApiFFI as an unsigned short.


  • Initial release
comments powered byDisqus