Android/Java long math sometimes off by a small decimal

view story

http://stackoverflow.com – I'm having a small issue that I cannot seem to figure out. I am getting the time in milliseconds from two calanders, subtracting them, and dividing the result to get the difference of the two calanders in days. When done repeatedly sometimes this math will be off by a small decimal, usually .0000001. Is there a way to remedy this? Note: I need to keep these numbers as a long value because they will get huge after a while. Heres the code: First I get the calander date's value in milliseconds... final long calendarOne = datePickerCalendar .getTimeInMillis(); final long c (HowTos)