I read that doubles should hold about 15 digits, and floats can only hold 7 (http://cplusplus.com/doc/tutorial/variables/). But then why does this code output as if both variables are floats? Not sure if this is cout's fault or what... I put a long double in too just to see what would happen.