More or less beginner with Arduino and the C language, I came across a problem where Arduino does not seem to keep enough decimals in a simple "multiplication / divider" operation.

My prolem is most simple : with the (GPS) string "4858.67068" I have to calculate the decimal degree of the Latitude by doing the following : 48 (first two caracteres) + 58.67068 (the remaining caracteres) / 60.

My Arduino (Uno) does only show at the end the value (float) of 48.98 while I was expecting many more decimals.
Something like 48,9778446666667

Great !! I tied the option ",N" and indeed the decimals popped up.
Does that mean that is was just a question of formatting the output text butthe variable contained the right information ?
Again thanks for helping me out.
/Robbert

rdegroot:
Great !! I tied the option ",N" and indeed the decimals popped up.
Does that mean that is was just a question of formatting the output text butthe variable contained the right information ?
Again thanks for helping me out.
/Robbert

No. Your input has about 9 significant digits. The float datatype can only store about 6. (It is "about" because binary digits don't exactly match decimal digits. There is an exact binary precision.)

If you are okay with losing that little bit of precision then go ahead. Else use a library like TinyGPS.