code: private Number addTimes(Object n, Number toAdd, int times)
      {
          Number m = (Number)n;
          if (m instanceof Double)
          {
              return m.doubleValue() + times * toAdd.doubleValue();
          }
          return m.intValue() + times * toAdd.intValue();
      }
docs: Computes n+toAdd*times, obeying the types of the numbers
  
  @param n The input
  @param toAdd The addend
  @param times The factor
  @return The result