Pergunta

I know that for floating point numbers IEEE has a standard representation format - IEEE 754. Is there a standard representation for uint64_t?

Foi útil?

Solução

It is unsigned integer therefore there is no signed bit, and simply there should be a flat bit structure such that

value = bit_0 * 2^0 + bit_1 * 2^1 + bit_2 * 2^2 +  . . .  + bit_(n-1) * 2^(n-1)
value = sigma (i=0 to n-1) {bit_i * 2^i}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top