#include typedef union { unsigned int x; float y; } TwoWay; main() { TwoWay p; unsigned int count = 0; p.x = 0x00000000L; while( p.x <= 0x7FFFFFFFL) { printf("Checking unsigned int %u OR float %g\n", p.x,p.y); if ( p.y > -1 && p.y < 1) count++; p.x = p.x+1; } }