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

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

http://github.com/jruderman/rust
Rust | 10 lines | 8 code | 2 blank | 0 comment | 0 complexity | f908cc759bb857ef523ebd70df21bf4e MD5 | raw file
 1
 2
 3fn main() {
 4    let f = 4.999999999999;
 5    assert (f > 4.90);
 6    assert (f < 5.0);
 7    let g = 4.90000000001e-10;
 8    assert (g > 5e-11);
 9    assert (g < 5e-9);
10}