Very simple question, but important: I was using a floating point number ('float') in C++ to handle movement speed, and it suddenly ran crazy. It turns out the speed increased very fast to 259614846795304004193338175520768.0. That's 33 digits, on a typical (non-double) floating point number. How is that even possible, and can it cause the rest of my program to derail? Or will this number simply be cut down to the 23 bits of significant digits that floating point numbers usually have?
(edit: This is not a bug hunt. I am simply trying to understand how a float can hold such a large number with perfect precision (it's not an exponent, because that would just leave a trail of zeroes after a few significant digits). I am not looking for flaws in my code, just a better understanding of how floating point numbers work, and how this can happen)
EDIT: The solution seems to be a mix of bits from several answers, so I don't know whom to assign as the correct answer. Floating point values are apparently assigned by exponent, which means that some numbers can be amazingly huge without losing precision, as long as they are precise exponents of 2 somehow. Mine was. I thought the size was limited to 23 bits, flat out. As soon as I started using variations of the number that were NOT precise exponents of 2, everything went crazy. Sorry for the radio silence, I had to figure this whole thing out experimentally, once I learned that about floating point numbers from various answers.
I seem unable to close the question. Could someone with proper clearance close it down? And thanks to everyone for the help, I am now far more enlightened regarding floating point numbers!