]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/float2.rs
Remove the in-tree `flate` crate
[rust.git] / src / test / run-pass / float2.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11
12
13
14 pub fn main() {
15     let a = 1.5e6f64;
16     let b = 1.5E6f64;
17     let c = 1e6f64;
18     let d = 1E6f64;
19     let e = 3.0f32;
20     let f = 5.9f64;
21     let g = 1e6f32;
22     let h = 1.0e7f64;
23     let i = 1.0E7f64;
24     let j = 3.1e+9f64;
25     let k = 3.2e-10f64;
26     assert_eq!(a, b);
27     assert!((c < b));
28     assert_eq!(c, d);
29     assert!((e < g));
30     assert!((f < h));
31     assert_eq!(g, 1000000.0f32);
32     assert_eq!(h, i);
33     assert!((j > k));
34     assert!((k < a));
35 }