PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/src/test/run-pass/float2.rs

http://github.com/jruderman/rust
Rust | 24 lines | 22 code | 2 blank | 0 comment | 4 complexity | e921e353a2cb0cf0ed3831a6a1ebbd92 MD5 | raw file
 1
 2
 3fn main() {
 4    let a = 1.5e6;
 5    let b = 1.5E6;
 6    let c = 1e6;
 7    let d = 1E6;
 8    let e = 3.0f32;
 9    let f = 5.9f64;
10    let g = 1e6f32;
11    let h = 1.0e7f64;
12    let i = 1.0E7f64;
13    let j = 3.1e+9;
14    let k = 3.2e-10;
15    assert (a == b);
16    assert (c < b);
17    assert (c == d);
18    assert (e < g);
19    assert (f < h);
20    assert (g == 1000000.0f32);
21    assert (h == i);
22    assert (j > k);
23    assert (k < a);
24}