I am trying to convert two floats to strings, as shown in the code below:
float Lat = 4234.2342;
float Lon = 7080.4587;
String LatString = dtostrf(Lat, 9, 4, buffer);
String LonString = dtostrf(Lon, 9, 4, buffer);
The serial monitor outputs:
Which is not the same as my float variables. Any suggestions as to why the last digit in both floats is off?
This gives from 6 to 9 significant decimal digits precision...
Thank you those links are helpful. Figured it was some inherent conversion error.
Is it possible to prevent the precision loss? The mantissa is very important for my application.
What is the original form that you receive the data in?