Fast-posit, sw implementation of posit arithmetic in Rust
Fast-posit, sw implementation of posit arithmetic in Rust
I've been following the development of posit arithmetic on and off for the past 2 years or so. A couple months ago I decided to try my hand at writing a software implementation. 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!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
A fast HNSW implementation in Rust
Fast Rust BitTorrent Tracker
StatsD in Rust
TF-IDF in Rust
Rust FFI in a Wireshark C dissector
Rust-wasm-webpack
Risp – Lisp in Rust
Screencast: An Introduction to Rust
Handlebars for Rust
Oxischeme – A Scheme implementation in Rust