rust/src/test/run-pass/floatlits.rs
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00

11 lines
167 B
Rust

fn main() {
let f = 4.999999999999;
assert (f > 4.90);
assert (f < 5.0);
let g = 4.90000000001e-10;
assert (g > 5e-11);
assert (g < 5e-9);
}