Floating point issue

I want to get all the digit after point but arduino automatically round off that num , i m using double data type, my code is

lat = (double)str.substring(i,j-10).toFloat();
lon = (double)str.substring(j,j+9).toFloat();
Serial.println(lat);
Serial.println(lon);

both lat and lon are double..............

plz help me

Which board?

How to convert string to double without losing precision in Arduino?

Arduino doesn't have a double.

-jim lee

@ketan01, do not cross-post again.

ketan01:
I want to get all the digit after point but arduino automatically round off that num , i m using double data type, my code is

lat = (double)str.substring(i,j-10).toFloat();

8-bit Atmega or 32-bit ARM based platform/board?

Only those 32-bit ARM based boards (like "DUE") can do "double", actually.
But 8-bit Atmega based boards (like "UNO") handle "double" declarations exactly the same as "float".

There is nothing like a "double precision" in floating point math with Atmega microcontrollers.

 Serial.println(lat, 5);
  Serial.println(lon, 5);