General Weighted Average Computation