Skip to main content

Site Navigation

Your Account

Choose Language

For anything that looks out of the ordinary on

118 Questions View all

Number formatting - inconsistent with number of decimals

Take a look at the number of decimals between fill-up and partial fuel-up:

On a partial, distance has 2 decimal places and fuel has 3 decimal places.

On a full fill-up, distance is an integer and fuel has 2 decimal places.

Not a big one, just a little UI discrepancy!

Answer this question I have this problem too

Is this a good question?

Score 0
Add a comment

3 Answers

William, I've noticed this as well. The fuel should normally only have 2 unless the user either entered in 3 decimals or if they entered in the total cost of the fuel-up which then the per gallon cost could get up to 5 decimals.

The partials is an annoying bug that is eluding us with so many new features coming up.

Thanks for the reminders though. They are always welcomed. Hope you are doing well man. Hope to see you in Dallas.

Was this answer helpful?

Score 0
Add a comment

When I programmed, I used one section of code to output a line. This eliminated the need to search "where I put that $&#* code at" syndrome.

For example:

echo ($fueltype=='partial')?"Partial":"Fill up";

echo number_format($gallons,3);

echo number_format($cpg,3);

echo ($fueltype=="partial")?"":number_format($mpg,2);

Obviously a lot more missing, but I would only use those lines of code to display whatever was to go on that line. It was then fairly simple to locate.

Have fun!

Was this answer helpful?

Score 0
Add a comment

IMO, fuel should always be 3 decimal place and MPG should be 2 decimal places. Keeps things fluid.

Was this answer helpful?

Score 0


Yes, I understand fluidity. However when we keep fuel to only 3 decimals I have users doing calculations, on a calculator, from the front end numbers and then complaining that the total cost of the fuel-up is incorrect because to get the exact price we are displaying you need 5 decimals. The nice thing is that if you, the user, only enters in 3 decimals then that is all you'll ever see. MPG has always only been 2 decimal places so that is simple.


Who cares how many decimal points the data field is. When the data field is displayed, you should only display a set number of decimal points. The user really doesn't care what is displayed past the third decimal as long as the calculation comes up correct.

Also, you have to draw the line somewhere and say this is what is being displayed and stick to it. Apple didn't make a great phone by caving into every demand or want the customer had.

Just my opinion...............................


ok, you got me. I'll stop what I'm doing and change everything. LOL


Add a comment

Add your answer

William Decker will be eternally grateful.
View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 0

All Time: 264