We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a4484 commit 98dd81eCopy full SHA for 98dd81e
tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs
@@ -0,0 +1,15 @@
1
+// run-pass
2
+// check-run-results
3
+// regression test for issue #109567
4
+
5
+fn f() -> f64 {
6
+ std::hint::black_box(-1.0) % std::hint::black_box(-1.0)
7
+}
8
9
+const G: f64 = -1.0 % -1.0;
10
11
+pub fn main() {
12
+ assert_eq!(-1, G.signum() as i32);
13
+ assert_eq!((-0.0_f64).to_bits(), G.to_bits());
14
+ assert_eq!(f().signum(), G.signum());
15
0 commit comments