Enable Non-determinism of float operations in Miri and change std tests by LorrensP-2158466 · Pull Request #138062 · rust-lang/rust (original) (raw)
Okay, I should have explained why the error code applies here.
Consider this arm:
// sin(+- 0) = +- 0. ("sinf32" | "sinf64", [input]) if input.is_zero() => Some(*input),
I still have to put an if-guard on it to check that input
is Zero, but in my opinion, it would be a lot nicer if I could do the following:
// sin(+- 0) = +- 0.
("sinf32" | "sinf64", [IeeeFloat::::Zero]) => Some(*input),
If I then were able to make a constant for 1
and maybe other values, I wouldn't need those if-guards. But unfortunately, the compiler doesn't try to see if this can work; it just assumes this to be non-exhaustive, regardless of a _ => ...
arm.
Luckily, you like the code :)