summaryrefslogblamecommitdiff
path: root/meap/meap-code/ch5/ch5-f32-as-u32.rs
blob: b23cf8905bd64528830ee1e0073294deaf25170a (plain) (tree)
1
2
3
4
5
6
7
8







                                           
fn main() {
  let a: f32 = 42.42;
  let frankentype: u32 = unsafe {
      std::mem::transmute(a) // <1>
  };

  println!("{:032b}", frankentype); // <2>
}