int float2bits (float x) {
  union {
    int i;
    float f;
  } temp;
  temp.f = x;
  return temp.i;
}

int main() {
  float x = 1.0;
  int i = float2bits(x);
  printf("%f = 0x%x\n", x, i);
  return 0;
}
