For those who don't know, posit arithmetic is a new(ish) floating point format that offers _several_ advantages over IEEE floats, in particular at lower precisions. It generally has better precision and simpler design, and offers the quire, a way to compute dot products very fast and with no rounding errors (much can be said about its often surprising uses); this makes it suitable for HPC, neural networks, etc. I have some links to references in the README, if you're interested in learning more. I find it really interesting!
This crate aims to be a fully complete and correct standard-compliant implementation. Even though it's WIP, it already has a decent chunk of functionality: you can define types with arbitrary size and exponent size, convert to/from ints/floats, do + - × ÷, use the quire, etc. The main thing missing are elementary functions (exp, log, sin, etc.).
It's also very very fast, according to my benchmarks probably the fastest free implementation atm! If anyone knows of a faster one please get in touch, I'd love to add it to the benchmark suite.
Correctness is extensively tested too, exhaustively where possible, and with proptest where not.
Finally, the code is well-documented, including the internal algorithms, which might possibly make it (I hope!) a useful learning tool.
Thanks for reading!