An Octave implementation of Posits arithmetic
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
absp.m
add.m
addbit.m
addbits.m
convposit.m
disposit.m
div.m
exacinv.m
factorialp.m
genatanpolf.m
genatanpolp.m
genpol1p.m
genpolberstein.m
genpolwilkinson.m
gensquarerootf.m
gensquarerootp.m
hornerp.m
int2posit.m
ints2posit.m
isequalp.m
mbin2dec.m
mdec2bin.m
mul.m
mulbits.m
oneposit.m
polystudy_berstein.m
polystudy_neumann.m
polystudy_wilkinson.m
posit.m
prodp.m
randp.m
regrunlength.m
roundmanta.m
roundmantm.m
save_simulation_results.m
sub.m
wilkinsonf.m
wilkinsonp.m
zeroposit.m

README.md

positsoctave

An Octave implementation of Posits arithmetic

This respository contains a set of functions implementing the basic operations in posits arithmetic. Each posit is represented by an structure containing a sign, exponent size, posit size, regime, exponent, and mantissa bits.

If a and b are posits with the same parameters (exponent size and posit size), you can operate on them by using the functions add, sub, mul, div and abs by passing both posits as arguments and receiving a third posit contanaing the result.

You can also print the posit content by using the disposit function. You can also perform the product of several posits (prodp) and do define 0 and 1 posit with specific parameters by using the functions zeroposit and one posit.