3 ms·
I had to look this up because it is a while that I tried to use floating point math in a const fn and it seems that the differences you described have been deci
by weinzierl 2y ago
I had to look this up because it is a while that I tried to use floating point math in a const fn and it seems that the differences you described have been decided to be acceptable.
Looks like floating point math in const fn is coming. Here is the respective tracking issue:
https://github.com/rust-lang/rust/issues/128288 https://github.com/rust-lang/rust/issues/128288
- kibwen 2y agoIt's actually already here, it stabilized last year in 1.82: https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#floating-point-nan-semantics-and-const https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#float...
- weinzierl 2y agoOh, nice. Sometime I find it really hard to track the status of new Rust features. For example the tracking issue I linked is still open with "Stabilize" missing.
- kibwen 2y agoThat's because the linked issue is a different, but related tracking issue. The FP-in-const tracking issue was this one: https://github.com/rust-lang/rust/issues/57241 https://github.com/rust-lang/rust/issues/57241