Maratyszcza/FP16

Conversion to/from half-precision floating point formats

385

stars

58

commits

C++

primary language

Jun 20, 2026

updated

floating-point
fp16
half-precision

README

FP16

Header-only library for conversion to/from half-precision floating point formats

Features

  • Supports IEEE and ARM alternative half-precision floating-point format
    • Property converts infinities and NaNs
    • Properly converts denormal numbers, even on systems without denormal support
  • Header-only library, no installation or build required
  • Compatible with C99 and C++11
  • Fully covered with unit tests and microbenchmarks

Acknowledgements

HPC Garage logo Georgia Tech College of Computing logo

The library is developed by Marat Dukhan of Georgia Tech. FP16 is a research project at Richard Vuduc's HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.

This material is based upon work supported by the U.S. National Science Foundation (NSF) Award Number 1339745. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of NSF.

Contributors

Maratyszcza

49 commits

brendandahl

1 commits

jameshilliard

1 commits

JerryShih

1 commits

Maratyszcza/FP16

Conversion to/from half-precision floating point formats

385

stars

58

commits

C++

primary language

Jun 20, 2026

updated

floating-point
fp16
half-precision

README

FP16

Header-only library for conversion to/from half-precision floating point formats

Features

  • Supports IEEE and ARM alternative half-precision floating-point format
    • Property converts infinities and NaNs
    • Properly converts denormal numbers, even on systems without denormal support
  • Header-only library, no installation or build required
  • Compatible with C99 and C++11
  • Fully covered with unit tests and microbenchmarks

Acknowledgements

HPC Garage logo Georgia Tech College of Computing logo

The library is developed by Marat Dukhan of Georgia Tech. FP16 is a research project at Richard Vuduc's HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.

This material is based upon work supported by the U.S. National Science Foundation (NSF) Award Number 1339745. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of NSF.

Contributors

Maratyszcza

49 commits

brendandahl

1 commits

jameshilliard

1 commits

JerryShih

1 commits

Languages

C++

95.3%

CMake

4.0%