As we know double
can store number from ±4.94065645841246544e-324
to ±1.79769313486231570e+308
. Can we store 128 bits value like IPv6 in double
and retrieve as it is? For example, to store IPv4 we can use a 32 bit integer and store them as 8 bits partition. And we can retrieve them by using bit masking.
There is no standard container to store 128 bit in any language AFAIK. I know double
can store 64 bits safely without any precision error but is there any hack?