Remix.run Logo
AlotOfReading 6 days ago

Support for float const fns was merged just a couple months ago and hasn't been officially announced yet.

BD103 6 days ago | parent | next [-]

Support for constant float operations was released in Rust 1.82! https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html

ok123456 6 days ago | parent | prev [-]

IIRC, that only supports elementary arithmetic operations. Useful but not general.

AlotOfReading 6 days ago | parent [-]

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.