rust/src/test/run-pass/float2.rs
Marijn Haverbeke 4f826d81f6 Make 1.f parse as a field access on the integer 1
A dot is only considered part of a number when not followed by a letter

Closes #1306
2011-12-16 11:46:57 +01:00

25 lines
428 B
Rust

fn main() {
let a = 1.5e6;
let b = 1.5E6;
let c = 1e6;
let d = 1E6;
let e = 3.0f32;
let f = 5.9f64;
let g = 1e6f32;
let h = 1.0e7f64;
let i = 1.0E7f64;
let j = 3.1e+9;
let k = 3.2e-10;
assert (a == b);
assert (c < b);
assert (c == d);
assert (e < g);
assert (f < h);
assert (g == 1000000.0f32);
assert (h == i);
assert (j > k);
assert (k < a);
}