Fa

Fast-posit, sw implementation of posit arithmetic in Rust

Hacker News

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 card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: including · Missing: supports, reddit linkedin, podcasting
89%89% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, code · Missing: mac, agents, macos
74%74% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io, including · Missing: https docs, excited, just released
71%71% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoStrong fit for a featured deal · Missing: plus, platform, intuitive
53%53% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: month, way · Missing: mobile apps, ios, personal
36%36% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
17%17% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

A
A fast HNSW implementation in Rust53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A fast HNSW implementation in Rust

Hacker News111
Fa
Fast Rust BitTorrent Tracker40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fast Rust BitTorrent Tracker

Hacker News3
St
StatsD in Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

StatsD in Rust

Hacker News1
TF
TF-IDF in Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TF-IDF in Rust

Hacker News1
Ru
Rust FFI in a Wireshark C dissector51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rust FFI in a Wireshark C dissector

Hacker News1
Ru
Rust-wasm-webpack50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rust-wasm-webpack

Hacker News6
Ri
Risp – Lisp in Rust68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Risp – Lisp in Rust

Hacker News314
Sc
Screencast: An Introduction to Rust57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Screencast: An Introduction to Rust

Hacker News3
Ha
Handlebars for Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Handlebars for Rust

Hacker News2
Ox
Oxischeme – A Scheme implementation in Rust56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Oxischeme – A Scheme implementation in Rust

Hacker News18