Compile-time floating point arithmetic (on stable)

63 points knickish

In the “most desired rust features” post from a couple days ago, the const_fn_floating_point_arithmetic feature was upvoted a lot. While the feature isn’t stable yet, I wanted to make a separate post highlighting that nearly all of the functionality is achievable via libraries.

const_soft_float is a nearly copy/paste version of a small subset of Rust’s libm code (used for math on some wasm targets I believe). constgebra implements some basic linear algebra functions on top of it.

Translating the Fortran/CPP implementations and using while loops instead of iterators is annoying, but all the building blocks exist to allow all fp operations at compile time.