Comment Comment by matja IEEE754 64-bit representation already has infinity: uint64_t x = 0x7ff0000000000000ULL; printf("%f\n", *(double *)&x); output: inf But you could use a representation where 0 is 0, and 1 is infinity, saving 63 bits... parent matja 2 years ago