summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/floatlits.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/numbers-arithmetic/floatlits.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/floatlits.rs b/src/test/ui/numbers-arithmetic/floatlits.rs
new file mode 100644
index 000000000..07049af31
--- /dev/null
+++ b/src/test/ui/numbers-arithmetic/floatlits.rs
@@ -0,0 +1,12 @@
+// run-pass
+
+
+
+pub fn main() {
+ let f = 4.999999999999f64;
+ assert!((f > 4.90f64));
+ assert!((f < 5.0f64));
+ let g = 4.90000000001e-10f64;
+ assert!((g > 5e-11f64));
+ assert!((g < 5e-9f64));
+}