Skip to content

MurrellGroup/Microfloats.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 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.

Instances of a sub-8 bit floating point type are still one byte wide in memory; Microfloats serves as a base for method dispatch and a reference for arithmetic operations, lending downstream packages a foundation for bitpacking and hardware acceleration.

Usage

Define your own primitive type with the macro:

using Microfloats

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

or see the documentation for a list of predefined types.

Installation

using Pkg
Pkg.add("Microfloats")

See also