Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

f32 e f64: ponto flutuante

São tipos de dados que só podem armazenar números que possuem uma parte fracionária ou números reais, positivos, negativos ou zero.

f32

#![allow(unused)]
fn main() {
// f32 = -3.4e+38 a +3.4e+38
let flutuante: f32 =  64.;
println!("{}", flutuante);
}

f64

#![allow(unused)]
fn main() {
// f64 = -1.8e+308 to +1.8e+308
let flutuante: f64 =  128.;
println!("{}", flutuante);
}