http://www.learncpp.com/cpp-tutorial/25-floating-point-numbers/ I have been about this lately to review C++.
In general computing class professors tend not to cover thes
Short version - you can't really avoid rounding and other representation errors when you're trying to represent base 10 numbers in base 2 (ie, using a float or a double to represent a decimal number). You pretty much either have to work out how many significant digits you actually have or you have to switch to a (slower) arbitrary precision library.