| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2025-04-27 | Implement the internal feature `cfg_target_has_reliable_f16_f128` | Trevor Gross | -0/+31 | |
| Support for `f16` and `f128` is varied across targets, backends, and backend versions. Eventually we would like to reach a point where all backends support these approximately equally, but until then we have to work around some of these nuances of support being observable. Introduce the `cfg_target_has_reliable_f16_f128` internal feature, which provides the following new configuration gates: * `cfg(target_has_reliable_f16)` * `cfg(target_has_reliable_f16_math)` * `cfg(target_has_reliable_f128)` * `cfg(target_has_reliable_f128_math)` `reliable_f16` and `reliable_f128` indicate that basic arithmetic for the type works correctly. The `_math` versions indicate that anything relying on `libm` works correctly, since sometimes this hits a separate class of codegen bugs. These options match configuration set by the build script at [1]. The logic for LLVM support is duplicated as-is from the same script. There are a few possible updates that will come as a follow up. The config introduced here is not planned to ever become stable, it is only intended to replace the build scripts for `std` tests and `compiler-builtins` that don't have any way to configure based on the codegen backend. MCP: https://github.com/rust-lang/compiler-team/issues/866 Closes: https://github.com/rust-lang/compiler-team/issues/866 [1]: https://github.com/rust-lang/rust/blob/555e1d0386f024a8359645c3217f4b3eae9be042/library/std/build.rs#L84-L186 | ||||
| 2024-10-05 | move f16/f128 const fn under f16/f128 feature gate | Ralf Jung | -4/+2 | |
| 2024-10-04 | Auto merge of #130157 - eduardosm:stabilize-const_float_classify, r=RalfJung | bors | -2/+0 | |
| Stabilize `const_float_classify` Tracking issue: https://github.com/rust-lang/rust/issues/72505 Also reverts https://github.com/rust-lang/rust/pull/114486 Closes https://github.com/rust-lang/rust/issues/72505 Stabilized const API: ```rust impl f32 { pub const fn is_nan(self) -> bool; pub const fn is_infinite(self) -> bool; pub const fn is_finite(self) -> bool; pub const fn is_subnormal(self) -> bool; pub const fn is_normal(self) -> bool; pub const fn classify(self) -> FpCategory; pub const fn is_sign_positive(self) -> bool; pub const fn is_sign_negative(self) -> bool; } impl f64 { pub const fn is_nan(self) -> bool; pub const fn is_infinite(self) -> bool; pub const fn is_finite(self) -> bool; pub const fn is_subnormal(self) -> bool; pub const fn is_normal(self) -> bool; pub const fn classify(self) -> FpCategory; pub const fn is_sign_positive(self) -> bool; pub const fn is_sign_negative(self) -> bool; } ``` cc `@rust-lang/wg-const-eval` `@rust-lang/libs-api` | ||||
| 2024-09-25 | Revert "Avoid invalid NaN lint machine-applicable suggestion in const context" | Eduardo Sánchez Muñoz | -2/+0 | |
| Reverts PR https://github.com/rust-lang/rust/pull/114486 (commit 1305a43d0a0c02cb224ab626745bd94af59c6098) | ||||
| 2024-09-12 | move a test to a better location | Ralf Jung | -0/+17 | |
| 2024-09-12 | simplify float::classify logic | Ralf Jung | -27/+75 | |
| 2024-09-10 | enable and extend float-classify test | Ralf Jung | -126/+128 | |
| 2024-09-10 | move float tests into their own dir | Jubilee Young | -0/+248 | |
