How floating point numbers are stored

A float in C++ is either 4 or 8 bits. A 4 bit float can hold a number up to 38 digits! I wasn't sure how a computer stores a number that large in such a small amount of ram so I did some research. I found that it's stored using a method called IEEE 754-1985 which Wikipedia has a very explanatory article on.

Leave A Reply
All content licensed under the Creative Commons License