Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microfloats

Stable Dev Build Status Coverage

Microfloats is a Julia package that implements types and arithmetic (through wider intermediates) for sub-byte floating points, supporting arbitrary combinations of sign, exponent, and significand (mantissa) bits.

In ordinary arrays, or as single instances, sub-8 bit floating points are one byte wide; Microfloats provides a numerical reference for any conceivable microfloat, but also offers canonical types for common narrow data formats which can then be used downstream by packages like cuTile.jl.

Usage

Define your own microfloat with the macro:

using Microfloats: @microfloat

@microfloat Float8_E5M2 sign=1 exponent=5 significand=2 nonfinite=Microfloats.IEEE

or find predefined types in the documentation.

Installation

using Pkg
Pkg.add("Microfloats")

See also

About

Narrow precision floating point types

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages