I wrote a small program that inputs a number n. then does 2 to the power of n. I realized afterwards that I did not include the 'maths' header but it still worked? (using microsoft visual C++ 2010 express). Heres the code:
That's because floats, like any type has some fixed precision. You can only store a finite amount of numbers on a finite amount of memory. Unlike, say, int, floats don't wrap around. They have special values to mean "infinity" or "not a number".