Created
December 17, 2016 00:02
-
-
Save matsimitsu/b839892c7f28192a83faf616661db730 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let str = "000030.294"; | |
let float: f32 = str.parse().unwrap(); | |
println!("{:?}", float); | |
} | |
// Running this on a Raspberry Pi returns: | |
//pi@raspberrypi ~ $ RUST_BACKTRACE=1 ./p1-monitor | |
//0.000000000000000000000000000000000000000000042 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment