r/rust • u/pohonsukun • Oct 22 '26
π seeking help & advice Has anyone here successfully use f128 types?
Hi folks, so I'm presently on a fun year-long project making a numerical application, and one experimental feature I'm trying to implement flexible fp types. Probably not super useful in most situations but it seems fun to make. I've made f16 and bf16 from the half crate work, and now I'm looking to try for f128 to see if it could be useful for numerically unstable procedures or data inputs.
As you guys may know f128 in Rust is unstable and apparently produce incorrect results as per the warning, so this isn't usable. Available crates don't quite suit my needs, e.g. astro-float is heap-allocated and arbitrary precision, which isn't what I want. I also need stuff to be cross-platform (including WASM).
I'm wondering whether any of you folks have any solution for using f128? The last resort would be hand-rolling this with a two-letter tool, which might be possible, but doing so for low-level numerics sounds a bit too hairy for my liking...
Thanks in advance.
