Double is the same as longlong, it takes up 8 bytes of data structure, but double does not use all bytes to store data. Longlong uses all bytes to store data. If you use longlong, you get more storage space than using double. If you use floating point numbers to store values, you should be prone to precision problems, so why use double instead of longlong I am rookie. I have searched on the search engine but I have not found an answer. I hope to get the answer to satisfy my curiosity.
Comment From: neomantra
Because it is not purely about the storage size, but also use cases. Redis is a generic data structure store -- users have all kinds of data they may apply.
64-bit floating point double gives a lot of flexibility and dynamic range, at the expense of having only 53-bits of integer. Forcing everybody to convert their z-scores to 64-bit integers in-and-out of Redis would be a burden (and probably a source of bugs).