I'm taking an intro c++ course and have gotten to the first real stumbling block in understanding.
There are some strange rounding problems that seem to crop up with double arithmetic and have found some great resources about floating point #'s like http://en.wikipedia.org/wiki/Floating_point and http://www.cplusplus.com/articles/Nb07M4Gy/ but haven't really found an easy answer for why this program wouldn't run as expected or whats going on with the math to make this "wonky". The professor may have glossed over this it b/c it's outside the scope of the class but any basic explanations of whats going on here or a point in the right direction would be much appreciated.