# \[ANN\] New package: floatml

**URL:** <https://discuss.ocaml.org/t/ann-new-package-floatml/18431>\
**Category:** Ecosystem\
**Tags:** floating-point, opam\
**Created:** [August 9, 2026, 11:28am UTC](https://discuss.ocaml.org/t/ann-new-package-floatml/18431 "2026-08-09T11:28:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![N1ark](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/n1ark/32/6207_2.png) [@N1ark](https://discuss.ocaml.org/u/N1ark)\
**Post date:** [August 9, 2026, 11:28am UTC](https://discuss.ocaml.org/t/ann-new-package-floatml/18431/1 "2026-08-09T11:28:02Z")

</div>

Hi :​) Wanted to announce a new package I worked on over the past week I just published, **[floatml](https://github.com/N1ark/floatml)**! It’s a tiny wrapper around Rust’s soft float library ([`rustc_apfloat`](https://github.com/rust-lang/rustc_apfloat)), enabling fast and efficient IEEE-754 `float16`, `float32`, `float64` and `float128` in OCaml. I also made sure the code allocates as little as possible, so it should be reasonably efficient.

**Disclaimer:** a good chunk of the code is LLM-authored. I chose the interface I wanted and guided it, but the glue code with Rust is LLM generated (and extensively tested!)

I had to create it for [Soteria](https://soteria-tools.com), where we need reductions for concrete float operations, to avoid using Z3 when possible. Maybe you’ll find a use for it too!

---

_[View the full topic](https://discuss.ocaml.org/t/ann-new-package-floatml/18431)._
