summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/float.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/numbers-arithmetic/float.rs')
-rw-r--r--src/test/ui/numbers-arithmetic/float.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/float.rs b/src/test/ui/numbers-arithmetic/float.rs
new file mode 100644
index 000000000..d55c05857
--- /dev/null
+++ b/src/test/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");
+ }
+}