View Single Post
  #7 (permalink)  
Old 05-06-2005, 01:18 PM
Jason Jason is offline
GreenHybrid Founder
 
Real Name: Jason Siegel
Location: Houston, TX
Hybrids: 2004 Toyota Prius
Posts: 4,528
Default Re: Math & Decimal Accuracy

For the sake of security and originality, I can't post the actual code. But, I obviously know exactly how it works.

Overrides just accept whatever figure the member provides, which is in tenths for mileage and ones for distance.

When it's tank by tank, the input is usually tenths and ones again unless they use the gallons>mileage converter. In that case, there's insignificant rounding (7 places?) and the mileage figure is stored as an extended decimal. The tank averages are weighted based on distance [(d1*m1)+(d2*m2)+(d3*m3)]/(m1+m2+m3) and the final car's mileage is stored with the same long decimal.

.

Visit my newly-acquired website, Volconvo Debate Forums!


Reply With Quote