Skip to content

goualard-f/MicroFloatingPoints.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroFloatingPoints

The MicroFloatingPoints package defines the Floatmu parametric type to manipulate IEEE 754 standard-compliant floating-point numbers with a very small size (from 5 bits up to 32 bits).

Example of use

Adding 0.25 and 2.0 in a floating-point format with 1 bit for the sign (implied), 2 bits for the exponent, and 2 bits for the fractional part (3 bits for the whole significand with the hidden bit), and testing whether the result had to be rounded:

julia> using MicroFloatingPoints

julia> Floatmu{2,2}(0.25)+Floatmu{2,2}(2.0)
2.0

julia> inexact()
true

Installation

The package can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add MicroFloatingPoints

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("MicroFloatingPoints")

Note that the matplotlib Python package must be available through PyCall.

Documentation

Project status

The package is developed and has been tested on Julia 1.6.

codecov.io

About

A Julia package to manipulate very small IEEE 754 standard-compliant floating-point numbers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages