Comment by AlotOfReading
2 days ago
Support for float const fns was merged just a couple months ago and hasn't been officially announced yet.
2 days ago
Support for float const fns was merged just a couple months ago and hasn't been officially announced yet.
Support for constant float operations was released in Rust 1.82! https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html
IIRC, that only supports elementary arithmetic operations. Useful but not general.
It's relatively straightforward to build transcendental functions out of the basic operations and the stdlib support will eventually get there, but rust's float story is still a work in progress. They're trying to do things more properly and document semantics better than C and C++ have.