about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/float.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/numbers-arithmetic/float.rs')
-rw-r--r--tests/ui/numbers-arithmetic/float.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/float.rs b/tests/ui/numbers-arithmetic/float.rs
new file mode 100644
index 00000000000..d55c05857b6
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/float.rs
@@ -0,0 +1,9 @@
+// run-pass
+pub fn main() {
+    let pi = 3.1415927f64;
+    println!("{}", -pi * (pi + 2.0 / pi) - pi * 5.0);
+    if pi == 5.0 || pi < 10.0 || pi <= 2.0 || pi != 22.0 / 7.0 || pi >= 10.0
+           || pi > 1.0 {
+        println!("yes");
+    }
+}