Well, I downloaded all of Dan's tank data and crunch them through the Excel equivalent of that formula and I got 18498 total miles and 315.08 total gallons. Works out to 58.7mpg. So something is wrong with the PHP version. Can you put in a debug statement and print out the numerator and denominator?
In any case, I'm busy tonight but I probably crunch through all cars tomorrow night and see what the different car types would be like with the new formula, and how the individual cars will change. Or we can just forget the whole thing. Are you interested in pursuing this further?
Andy
|