public class doublePrecision { public static void main(String[] args) { double total = 0; total += 5.6; total += 5.8; System.out
Check out BigDecimal, it handles problems dealing with floating point arithmetic like that.
The new call would look like this:
term[number].coefficient.add(co);
Use setScale() to set the number of decimal place precision to be used.