Your comments

Sorry, I meant fuel price. It works fine when you initially add a new entry (3 decimals is fine), and it calculates it correctly. But when you go back to edit an entry, the fuel price is reloaded with only 2 decimal places. When you exit the edit page, the mileage is recalculated with the 2 decimal place number, even though you didn't change it.