mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
11 lines
297 B
Rust
11 lines
297 B
Rust
// run-pass
|
|
fn const_mir() -> f32 { 9007199791611905.0 }
|
|
|
|
fn main() {
|
|
let original = "9007199791611905.0"; // (1<<53)+(1<<29)+1
|
|
let expected = "9007200000000000";
|
|
|
|
assert_eq!(const_mir().to_string(), expected);
|
|
assert_eq!(original.parse::<f32>().unwrap().to_string(), expected);
|
|
}
|