fork(1) download
  1. #include <stdio.h>
  2. #include <inttypes.h>
  3. typedef union tfx { float f; uint32_t u; } tfu;
  4. int main()
  5. {
  6. tfu u, u2;
  7.  
  8. u.f = 3000000.0f;
  9. u2 = u;
  10. u2.u++;
  11.  
  12. printf( "%f (%d) -> %f (%d)\n", u.f, u.u, u2.f, u2.u );
  13. return 0;
  14. }
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
3000000.000000 (1245125376) -> 3000000.250000 (1245125377)